diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Object.h | 1 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 8 | ||||
-rw-r--r-- | src/game/ZoneScript.h | 10 |
3 files changed, 14 insertions, 5 deletions
diff --git a/src/game/Object.h b/src/game/Object.h index 4970b4bab01..d710e34ef36 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -536,6 +536,7 @@ class TRINITY_DLL_SPEC WorldObject : public Object Map const* GetBaseMap() const; void SetZoneScript(); + ZoneScript * GetZoneScript() const { return m_zoneScript; } TempSummon* SummonCreature(uint32 id, float x, float y, float z, float ang = 0,TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN,uint32 despwtime = 0); Vehicle* SummonVehicle(uint32 entry, float x, float y, float z, float ang = 0); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b99a6169161..a302bc60ec0 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2967,6 +2967,8 @@ void Spell::SendLoot(uint64 guid, LootType loottype) { sLog.outDebug("Goober ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow()); sWorld.ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget); + if(gameObjTarget->GetZoneScript()) + gameObjTarget->GetZoneScript()->ProcessEvent(gameObjTarget, gameObjTarget->GetGOInfo()->goober.eventId); } // cast goober spell @@ -4395,7 +4397,11 @@ void Spell::EffectHealMaxHealth(uint32 /*i*/) if(!unitTarget->isAlive()) return; - int32 addhealth = unitTarget->GetMaxHealth() - unitTarget->GetHealth(); + int32 addhealth; + if(m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN) // Lay on Hands + addhealth = m_caster->GetMaxHealth(); + else + addhealth = unitTarget->GetMaxHealth() - unitTarget->GetHealth(); if(m_originalCaster) m_originalCaster->DealHeal(unitTarget, addhealth, m_spellInfo); } diff --git a/src/game/ZoneScript.h b/src/game/ZoneScript.h index 2725e44c16c..8c8ccaedcb9 100644 --- a/src/game/ZoneScript.h +++ b/src/game/ZoneScript.h @@ -36,12 +36,14 @@ class TRINITY_DLL_SPEC ZoneScript virtual void OnGameObjectCreate(GameObject *go, bool add) {} //All-purpose data storage 64 bit - virtual uint64 GetData64(uint32 /*Data*/) { return 0; } - virtual void SetData64(uint32 /*Data*/, uint64 /*Value*/) {} + virtual uint64 GetData64(uint32 /*DataId*/) { return 0; } + virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) {} //All-purpose data storage 32 bit - virtual uint32 GetData(uint32) { return 0; } - virtual void SetData(uint32, uint32 data) {} + virtual uint32 GetData(uint32 /*DataId*/) { return 0; } + virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {} + + virtual void ProcessEvent(WorldObject *obj, uint32 eventId) {} }; #endif
\ No newline at end of file |