*Lay on hands should have heal amount = caster's max health.
*Let goober call zonescript when an event happens. *Thanks Elron for the last rev (flight bug) --HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user