*Apply tenacity buff on vehicles of wintergrasp.

*Fix the bug that tenacity is not applied on horde players.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-05 14:21:25 -05:00
parent afd79d7ebf
commit 13fd9ea601
5 changed files with 80 additions and 14 deletions

View File

@@ -26,6 +26,7 @@
#include "Chat.h"
#include "CreatureAI.h"
#include "ZoneScript.h"
Vehicle::Vehicle() : Creature(), m_vehicleInfo(NULL), m_usableSeatNum(0)
{
@@ -41,6 +42,8 @@ void Vehicle::AddToWorld()
{
if(!IsInWorld())
{
if(m_zoneScript)
m_zoneScript->OnCreatureCreate(this, true);
ObjectAccessor::Instance().AddObject(this);
Unit::AddToWorld();
AIM_Initialize();
@@ -58,6 +61,8 @@ void Vehicle::RemoveFromWorld()
{
if(IsInWorld())
{
if(m_zoneScript)
m_zoneScript->OnCreatureCreate(this, false);
RemoveAllPassengers();
///- Don't call the function for Creature, normal mobs + totems go in a different storage
Unit::RemoveFromWorld();