From 248286c08d5dc82675271f715bff4643aee4a880 Mon Sep 17 00:00:00 2001 From: Trazom62 Date: Mon, 22 Mar 2010 14:07:08 +0100 Subject: Fix Crash in XT-002 (Gravity Bomb proc). Fixes issue #734. Fix compilation warning. Fix typo in Freya soundid. --HG-- branch : trunk --- src/game/Unit.cpp | 6 +++++- src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4f97861c9a1..fabc476e8ff 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -14314,7 +14314,11 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co // In most cases req get honor or XP from kill if (EventProcFlag & PROC_FLAG_KILL && GetTypeId() == TYPEID_PLAYER) { - bool allow = this->ToPlayer()->isHonorOrXPTarget(pVictim); + bool allow = false; + + if (pVictim) + allow = ToPlayer()->isHonorOrXPTarget(pVictim); + // Shadow Word: Death - can trigger from every kill if (aura->GetId() == 32409) allow = true; diff --git a/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp b/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp index 9d2c9f8d6fb..a112108389a 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_xt002.cpp @@ -459,7 +459,7 @@ struct boss_xt002_AI : public BossAI uiSpawnAddTimer = TIMER_SPAWN_ADD; if (!hardMode) - m_creature->ModifyHealth(-transferHealth); + m_creature->ModifyHealth(-((int32)transferHealth)); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); phase = 1; -- cgit v1.2.3