TrinityCore/TrinityCore — Issue #4150: auras are not applied at respawn
Author: tREAk
Created: 2011-11-30 03:17:07+00:00
State: open

rev. 5ea9931f75ce5a64a2920ab4a763e9f06fe35151

i've done some simple sai:

```sql
UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=34852;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=34852;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(34852,0,0,1,8,0,100,0,66390,0,3000,3000,33,34852,0,0,0,0,0,7,0,0,0,0,0,0,0,'Slain Tualiq Villager - On Read Last Rites Hit - Give Kill Credit'),
(34852,0,1,0,61,0,100,0,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Slain Tualiq Villager - On Read Last Rites Hit - Despawn after 3 secs');

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=46870;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(18,0,46870,0,24,2,34852,0,0,'','Item target dead Slain Tualiq Villager');
```

i used the item on a dead Slain Tualiq Villager - and get the kill credit - the creature despawned
after the same creature was respawned i tried it again - but there was no kill credit and the creature is not despawned after 3 sec - the creature didn't react on any spellhit.

after a server restart i compared the auras befor and after the first spellhit (with `.list auras`)

- before the creature had the auras which are given in the `creature_template_addon` (feign death)
- after respawn from the first credit and despawn event - there was 0 auras on the creature and it couln't occur any event no more

it seems that the creature after the respawn (reset) is "apathetic".