07-27-2016, 09:41 AM
[FreedomCore6] Executed a DB script, which removes animation states (sit, kneel, sleep and etc.) from all entries in creature template. Already spawned creatures still retain their old animation states. This should fix [url="http://w11.zetaboards.com/WoW_Freedom/topic/11722988/"><s></s>Npcs spawning in a state of Sleep/Death/Sit/Kneel issue.
<blockquote class='code_blockquote'><dl><dt>Code: </dt><dd> </dd></dl><code>
SET @UNIT_FLAG_UNK_29 := 536870912; -- 0x2000 0000
SET @UNIT_FLAG2_FEIGN_DEATH := 1; -- 0x1
SET @UNIT_DYNFLAG_DEAD := 64; -- 0x40
-- Deathstate
UPDATE wod_world.creature_template a SET
a.unit_flags = a.unit_flags & ~ @UNIT_FLAG_UNK_29,
a.unit_flags2 = a.unit_flags2 & ~ @UNIT_FLAG2_FEIGN_DEATH,
a.dynamicflags = a.dynamicflags & ~ @UNIT_DYNFLAG_DEAD
;
-- Other animation states
UPDATE wod_world.creature_template_addon b SET
b.bytes1 = 0;
-- Few SmartAI death-states
DELETE FROM wod_world.smart_scripts
WHERE `comment` LIKE '%On Reset%Cast%Feign Death%';
</code></blockquote>
<blockquote class='code_blockquote'><dl><dt>Code: </dt><dd> </dd></dl><code>
SET @UNIT_FLAG_UNK_29 := 536870912; -- 0x2000 0000
SET @UNIT_FLAG2_FEIGN_DEATH := 1; -- 0x1
SET @UNIT_DYNFLAG_DEAD := 64; -- 0x40
-- Deathstate
UPDATE wod_world.creature_template a SET
a.unit_flags = a.unit_flags & ~ @UNIT_FLAG_UNK_29,
a.unit_flags2 = a.unit_flags2 & ~ @UNIT_FLAG2_FEIGN_DEATH,
a.dynamicflags = a.dynamicflags & ~ @UNIT_DYNFLAG_DEAD
;
-- Other animation states
UPDATE wod_world.creature_template_addon b SET
b.bytes1 = 0;
-- Few SmartAI death-states
DELETE FROM wod_world.smart_scripts
WHERE `comment` LIKE '%On Reset%Cast%Feign Death%';
</code></blockquote>