Hi!

I'm trying to put the Enhanced Client Hot Bar to work, but I'm strugling with a specific problem.

As I do a "spell = SpellRegistry.NewSpell( spellID, from, null )", I can spell.cast(), but I can't define a target (anymore).

Is the only way to do this via Reflection (searching for types with the Target method)?

Thanks!
 
I think the hotbar in the Enhanced Client is supported by the client itself.
I haven't really tried to do anything with EC in a while though.
 
Hi, ZeroDowned!

If the "KR support" is enabled via flag, the hotbar sends another kind of packet, which consists of the action (use item, skill or spell) plus the target.

Item and skill use was very straightforward and easy. I solved the spell problem yesterday.

At Spells.cs I created a property "MacroTarget" and another OnCast method called OnCastMacro.
So, I checked if the MacroTarget is set, the Spell would call the OnCastMacro instead of the descendant OnCast.

At the OnCastMacro, I used reflection to see if the descendant (specific spells) have the Target method (mobile, idamageable, or ipoint3d) and I call it. This way I didn't need to overwrite every single spell class to make it work.

I'll make a post with the Enhanced Client fixes I'm working on, and how to implement each one of them, so, maybe, we can see small fixes being repoed until the enhanced client is full supported.
 
Back