Jump to content

Can't cast helpful spells on friendly NPCs


antiroot

Recommended Posts

Mangos Version: 10685

Custom Patches: AHBot

SD2 Version: 1862

Database Name and Version : UDB 393

How it SHOULD work:

Should be able to cast helpful spells on friendly NPCs

How it DOES work:

Spells are cast at the caster directly regardless of NPC being targeted

Makes any quest objective where placing a buff on an NPC impossible

Tried looking through the commits for anything that has touched spell targeting related code but i'm not sure when this bug happened, but I was pretty sure I had at one time been able to successfully cast helpful buffs on NPCs in the past

Link to comment
Share on other sites

The NPCs i've tested had unitflag=4096 (UNIT_FLAG_PVP), I OR'd 8 (UNIT_FLAG_PVP_ATTACKABLE) onto the field resulting in 4104 and now beneficial buffs can be placed on the NPC.

This was a database issue, this thread can be closed, bug report is false

sorry guys I should have checked my db since that has been updated since the last time i was able to cast a spell on an NPC

Although if an NPC has flag 4096 why is flag 8 needed?

Link to comment
Share on other sites

lol I know all about bitmasking, that wasn't exactly where i was confused. I was confused that the wiki (although possibly inaccurate) states

8 UNIT_FLAG_PVP_ATTACKABLE (allow apply pvp rules to attackable state in addition to faction dependent state)

4096 UNIT_FLAG_PVP Allows item spells to be casted upon

if 4096 allows spells to be cast on NPC than why is 8 needed.

Also if an NPC has flag 8 applied then their name text becomes blue like a playable character not green/orange/red depending on reputation/faction. Also another thing i've notice city guards are affected by this not being able to cast buffs on them, and they also no longer have the PvP text when you mouse over. I do think this sounds like DB problem, but comparing by backups with my current DB i see no difference in their flags, so it sounds like something in core has changed and database has just not caught up

Link to comment
Share on other sites

lol I know all about bitmasking, that wasn't exactly where i was confused. I was confused that the wiki (although possibly inaccurate) states

8 UNIT_FLAG_PVP_ATTACKABLE (allow apply pvp rules to attackable state in addition to faction dependent state)

4096 UNIT_FLAG_PVP Allows item spells to be casted upon

if 4096 allows spells to be cast on NPC than why is 8 needed.

Also if an NPC has flag 8 applied then their name text becomes blue like a playable character not green/orange/red depending on reputation/faction. Also another thing i've notice city guards are affected by this not being able to cast buffs on them, and they also no longer have the PvP text when you mouse over. I do think this sounds like DB problem, but comparing by backups with my current DB i see no difference in their flags, so it sounds like something in core has changed and database has just not caught up

You totally made it sound like something else :)

Anyhow, those flags (UNIT_FLAG_PVP_ATTACKABLE and UNIT_FLAG_PVP) checked client side only. Server only sets them.

By the looks of it, UnitFlags enum needs some updating :) feel free to test those flags and list the results.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use