What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Conversion of string into WoWUnit

wownerds

New Member
Joined
Feb 15, 2011
Messages
1,385
Reaction score
30
Hey there,

I'm currently working on getting a spell cast on a specific target, checking some conditions beforehand. I am experiencing great problems trying to convert a string, which is a specific player's name, into a WoWUnit or WoWPlayer object.

The basic idea for trying it this way is the following:

1. User can enter a player's name that should buffed
2. CC buffs this player by name

Does anyone know how I can possibly make Spellmanager.CanBuff and Spellmanager.Buff work with a converted string as a bufftarget?

Thanks in advance,

Wownerds
 
Don't think it's possible to explicitly convert string to WoWUnit however you can use the WoWUnit Target = ObjectManager.GetObjectsOfType<WoWUnit>().Where(Unit => Unit.Name == SpecifiedName).FirstOrDefault();
 
Back
Top