|
Патчи на рассмотрении Рассматриваемые к принятию патчи |
|
Опции темы | Поиск в этой теме | Опции просмотра |
01.08.2010, 20:19 | #1 | |
Пользователь
Регистрация: 23.03.2010
Сообщений: 51
Сказал(а) спасибо: 14
Поблагодарили 32 раз(а) в 15 сообщениях
|
[fix]EventAI: EVENT_T_DEATH
Цитата:
Код:
diff a/src/game/Unit.cpp b/src/game/Unit.cpp --- Unit.cpp +++ Unit.cpp @@ -665,6 +665,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss) if (Player* recipient = ((Creature*)pVictim)->GetOriginalLootRecipient()) player_tap = recipient; + + // Call creature just died function + if (((Creature*)pVictim)->AI()) + ((Creature*)pVictim)->AI()->JustDied(this); } // in player kill case group tap selected by player_tap (killer-player itself, or charmer, or owner, etc) else @@ -728,10 +732,6 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss) } } - DEBUG_FILTER_LOG(LOG_FILTER_DAMAGE,"SET JUST_DIED"); - if(!spiritOfRedemtionTalentReady) - pVictim->setDeathState(JUST_DIED); - DEBUG_FILTER_LOG(LOG_FILTER_DAMAGE,"DealDamageHealth1"); if(spiritOfRedemtionTalentReady) @@ -751,7 +751,11 @@ uint32 Unit::DealDamage(Unit *pVictim, u pVictim->CastSpell(pVictim,27827,true,NULL,spiritOfRedemtionTalentReady); } else + { + DEBUG_FILTER_LOG(LOG_FILTER_DAMAGE,"SET JUST_DIED"); + pVictim->setDeathState(JUST_DIED); pVictim->SetHealth(0); + } // remember victim PvP death for corpse type and corpse reclaim delay // at original death (not at SpiritOfRedemtionTalent timeout) @@ -796,9 +800,6 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss) // only lootable if it has loot or can drop gold cVictim->PrepareBodyLootState(); } - // Call creature just died function - if (cVictim->AI()) - cVictim->AI()->JustDied(this); if (cVictim->isTemporarySummon()) { Последний раз редактировалось Vinolentus; 01.08.2010 в 20:21. |
|
|
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
EventAI Конструктор | Konctantin | Tools | 15 | 21.10.2012 16:42 |
[10494] Really allow proccesing buff events in EventAI. | newsbot | CMaNGOS Commits | 0 | 17.09.2010 21:38 |
[10399] Fixed typo in doc/EventAI.txt | newsbot | CMaNGOS Commits | 0 | 22.08.2010 13:00 |
[10368] Use AI function DoCastSpellIfCan for eventAI ACTION_T_CAST | newsbot | CMaNGOS Commits | 0 | 18.08.2010 02:36 |
EventAI: EVENT_T_DEATH | Vinolentus | Баг-репорты | 1 | 30.07.2010 00:50 |