Jump to content

[BUG 10788] SQL Update sets PvP for too many creatures


Recommended Posts

Posted

Hi all,

It looks like the sql update for Core 10788 (01 & 02) to split bytes2 into b2_0_sheath and b2_1_pvp_state in creature_addon and creature_template_addon sets a ton of creature b2_1_pvp_state values to 16. This value (listed as UNIT_BYTE2_FLAG_UNK4 in Unit.h) has the effect of turning on PVP flags for many, many things it shouldn't. For example, in Northshire, the Kobolds in the noob area are all flagged PvP. I thought at first it was maybe just humanoids, but just outside Northshire there are PvP Deer and Mangy Wolves.

Thanks,

Fez

Posted
Hi all,

sets a ton of creature b2_1_pvp_state values to 16.

That would be expected, most likely many of them had wrong data initially, data that came from 2.x and was not updated for 3.x. That is database related of course.

Another thing is, the pvp state itself are more dynamic than what we earlier assumed. One creature entry may or may not be flagged for pvp, it seem to be conditional. What the conditions are, is not known. Possibly related to player state, area the creature is in, etc.

Posted

I can totally believe that. Am I correct in assuming that a zero-flag would default back to the previous PvP status behavior? If so, wouldn't it be better to zero these 4,500 creatures than to accidentally be turning on player PvP when hitting a rabbit or somesuch?

Posted

In any cases sql update just move data from one place to another and this is not sql update problem, and not core problem.

Ofc, if field can be filled totally independent from DB data in some form missing like way is core problem.

Posted

The 'problem' actually start with https://github.com/mangos/mangos/commit/a93605ce748b228cb2f98ebb9e00a4f04e7a31c9

Some cases were found where faction alone could not be used explicit to determine pvp state. Since the conditions are not known, manual data is the only way to set pvp state where we cannot detect it automatically. That has the side effect of using the older data, which may be wrong (the 16 flag mentioned) and then naturally revealing the bugs in that data.

×
×
  • 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