*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -23,9 +23,14 @@
|
||||
|
||||
#include "BattleGround.h"
|
||||
|
||||
#define BG_WS_MAX_TEAM_SCORE 3
|
||||
#define BG_WS_FLAG_RESPAWN_TIME (23*IN_MILISECONDS)
|
||||
#define BG_WS_FLAG_DROP_TIME (10*IN_MILISECONDS)
|
||||
enum BG_WS_TimerOrScore
|
||||
{
|
||||
BG_WS_MAX_TEAM_SCORE = 3,
|
||||
BG_WS_FLAG_RESPAWN_TIME = 23000,
|
||||
BG_WS_FLAG_DROP_TIME = 10000,
|
||||
BG_WS_SPELL_FORCE_TIME = 600000,
|
||||
BG_WS_SPELL_BRUTAL_TIME = 900000
|
||||
};
|
||||
|
||||
enum BG_WS_Sound
|
||||
{
|
||||
@@ -43,7 +48,9 @@ enum BG_WS_SpellId
|
||||
BG_WS_SPELL_WARSONG_FLAG = 23333,
|
||||
BG_WS_SPELL_WARSONG_FLAG_DROPPED = 23334,
|
||||
BG_WS_SPELL_SILVERWING_FLAG = 23335,
|
||||
BG_WS_SPELL_SILVERWING_FLAG_DROPPED = 23336
|
||||
BG_WS_SPELL_SILVERWING_FLAG_DROPPED = 23336,
|
||||
BG_WS_SPELL_FOCUSED_ASSAULT = 46392,
|
||||
BG_WS_SPELL_BRUTAL_ASSAULT = 46393
|
||||
};
|
||||
|
||||
enum BG_WS_WorldStates
|
||||
@@ -151,6 +158,10 @@ class BattleGroundWS : public BattleGround
|
||||
void RespawnFlag(uint32 Team, bool captured);
|
||||
void RespawnFlagAfterDrop(uint32 Team);
|
||||
uint8 GetFlagState(uint32 team) { return m_FlagState[GetTeamIndexByTeamId(team)]; }
|
||||
void AddTimedAura(uint32 aura);
|
||||
void RemoveTimedAura(uint32 aura);
|
||||
bool IsBrutalTimerDone;
|
||||
bool IsForceTimerDone;
|
||||
|
||||
/* Battleground Events */
|
||||
virtual void EventPlayerDroppedFlag(Player *Source);
|
||||
@@ -183,6 +194,9 @@ class BattleGroundWS : public BattleGround
|
||||
uint32 m_TeamScores[2];
|
||||
int32 m_FlagsTimer[2];
|
||||
int32 m_FlagsDropTimer[2];
|
||||
|
||||
int32 m_FlagSpellForceTimer;
|
||||
int32 m_FlagSpellBrutalTimer;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -2325,7 +2325,7 @@ bool ChatHandler::HandleWpLoadPathCommand(const char *args)
|
||||
return true;
|
||||
}
|
||||
|
||||
guidlow = target->GetGUIDLow();
|
||||
guidlow = target->GetDBTableGUIDLow();
|
||||
QueryResult *result = WorldDatabase.PQuery( "SELECT guid FROM creature_addon WHERE guid = '%u'",guidlow);
|
||||
|
||||
if( result )
|
||||
|
||||
+15
-10
@@ -257,7 +257,7 @@ template<>
|
||||
void Map::AddToGrid(Creature* obj, NGridType *grid, Cell const& cell)
|
||||
{
|
||||
// add to world object registry in grid
|
||||
if(obj->isPet() || obj->HasSharedVision() || obj->isVehicle())
|
||||
if(obj->isPet() || obj->isVehicle() || obj->IsTempWorldObject)
|
||||
{
|
||||
(*grid)(cell.CellX(), cell.CellY()).AddWorldObject<Creature>(obj, obj->GetGUID());
|
||||
}
|
||||
@@ -309,7 +309,7 @@ template<>
|
||||
void Map::RemoveFromGrid(Creature* obj, NGridType *grid, Cell const& cell)
|
||||
{
|
||||
// remove from world object registry in grid
|
||||
if(obj->isPet() || obj->HasSharedVision() || obj->isVehicle())
|
||||
if(obj->isPet() || obj->isVehicle() || obj->IsTempWorldObject)
|
||||
{
|
||||
(*grid)(cell.CellX(), cell.CellY()).RemoveWorldObject<Creature>(obj, obj->GetGUID());
|
||||
}
|
||||
@@ -339,20 +339,25 @@ void Map::SwitchGridContainers(T* obj, bool on)
|
||||
|
||||
if(on)
|
||||
{
|
||||
if(!grid.RemoveGridObject<T>(obj, obj->GetGUID())
|
||||
grid.RemoveGridObject<T>(obj, obj->GetGUID());
|
||||
grid.AddWorldObject<T>(obj, obj->GetGUID());
|
||||
/*if(!grid.RemoveGridObject<T>(obj, obj->GetGUID())
|
||||
|| !grid.AddWorldObject<T>(obj, obj->GetGUID()))
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!grid.RemoveWorldObject<T>(obj, obj->GetGUID())
|
||||
grid.RemoveWorldObject<T>(obj, obj->GetGUID());
|
||||
grid.AddGridObject<T>(obj, obj->GetGUID());
|
||||
/*if(!grid.RemoveWorldObject<T>(obj, obj->GetGUID())
|
||||
|| !grid.AddGridObject<T>(obj, obj->GetGUID()))
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
obj->IsTempWorldObject = on;
|
||||
}
|
||||
|
||||
template void Map::SwitchGridContainers(Creature *, bool);
|
||||
@@ -1035,6 +1040,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell)
|
||||
|
||||
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||
c->SetCurrentCell(new_cell);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1048,10 +1054,9 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell)
|
||||
#endif
|
||||
|
||||
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
||||
{
|
||||
EnsureGridCreated(GridPair(new_cell.GridX(), new_cell.GridY()));
|
||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||
}
|
||||
EnsureGridCreated(GridPair(new_cell.GridX(), new_cell.GridY()));
|
||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||
c->SetCurrentCell(new_cell);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -381,6 +381,8 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
|
||||
if(m_activeNonPlayersIter != m_activeNonPlayers.end())
|
||||
{
|
||||
ActiveNonPlayers::iterator itr = m_activeNonPlayers.find(obj);
|
||||
if(itr == m_activeNonPlayers.end())
|
||||
return;
|
||||
if(itr==m_activeNonPlayersIter)
|
||||
++m_activeNonPlayersIter;
|
||||
m_activeNonPlayers.erase(itr);
|
||||
|
||||
+58
-46
@@ -487,42 +487,48 @@ void WorldSession::HandleAddFriendOpcode( WorldPacket & recv_data )
|
||||
|
||||
void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 accountId, std::string friendNote)
|
||||
{
|
||||
if(!result)
|
||||
return;
|
||||
|
||||
uint64 friendGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
uint32 team = Player::TeamForRace((*result)[1].GetUInt8());
|
||||
|
||||
delete result;
|
||||
|
||||
uint64 friendGuid;
|
||||
uint32 team;
|
||||
FriendsResult friendResult;
|
||||
|
||||
WorldSession * session = sWorld.FindSession(accountId);
|
||||
|
||||
if(!session || !session->GetPlayer())
|
||||
return;
|
||||
|
||||
friendResult = FRIEND_NOT_FOUND;
|
||||
friendGuid = 0;
|
||||
|
||||
FriendsResult friendResult = FRIEND_NOT_FOUND;
|
||||
if(friendGuid)
|
||||
if(result)
|
||||
{
|
||||
if(friendGuid==session->GetPlayer()->GetGUID())
|
||||
friendResult = FRIEND_SELF;
|
||||
else if(session->GetPlayer()->GetTeam() != team && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND) && session->GetSecurity() < SEC_MODERATOR)
|
||||
friendResult = FRIEND_ENEMY;
|
||||
else if(session->GetPlayer()->GetSocial()->HasFriend(GUID_LOPART(friendGuid)))
|
||||
friendResult = FRIEND_ALREADY;
|
||||
else
|
||||
friendGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
team = Player::TeamForRace((*result)[1].GetUInt8());
|
||||
|
||||
delete result;
|
||||
|
||||
if(friendGuid)
|
||||
{
|
||||
Player* pFriend = ObjectAccessor::FindPlayer(friendGuid);
|
||||
if( pFriend && pFriend->IsInWorld() && pFriend->IsVisibleGloballyFor(session->GetPlayer()))
|
||||
friendResult = FRIEND_ADDED_ONLINE;
|
||||
if(friendGuid==session->GetPlayer()->GetGUID())
|
||||
friendResult = FRIEND_SELF;
|
||||
else if(session->GetPlayer()->GetTeam() != team && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND) && session->GetSecurity() < SEC_MODERATOR)
|
||||
friendResult = FRIEND_ENEMY;
|
||||
else if(session->GetPlayer()->GetSocial()->HasFriend(GUID_LOPART(friendGuid)))
|
||||
friendResult = FRIEND_ALREADY;
|
||||
else
|
||||
friendResult = FRIEND_ADDED_OFFLINE;
|
||||
|
||||
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))
|
||||
{
|
||||
friendResult = FRIEND_LIST_FULL;
|
||||
sLog.outDebug( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());
|
||||
}
|
||||
Player* pFriend = ObjectAccessor::FindPlayer(friendGuid);
|
||||
if( pFriend && pFriend->IsInWorld() && pFriend->IsVisibleGloballyFor(session->GetPlayer()))
|
||||
friendResult = FRIEND_ADDED_ONLINE;
|
||||
else
|
||||
friendResult = FRIEND_ADDED_OFFLINE;
|
||||
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))
|
||||
{
|
||||
friendResult = FRIEND_LIST_FULL;
|
||||
sLog.outDebug( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());
|
||||
}
|
||||
|
||||
session->GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote);
|
||||
session->GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,31 +577,37 @@ void WorldSession::HandleAddIgnoreOpcode( WorldPacket & recv_data )
|
||||
|
||||
void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult *result, uint32 accountId)
|
||||
{
|
||||
if(!result)
|
||||
return;
|
||||
|
||||
uint64 IgnoreGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
|
||||
delete result;
|
||||
|
||||
uint64 IgnoreGuid;
|
||||
FriendsResult ignoreResult;
|
||||
|
||||
WorldSession * session = sWorld.FindSession(accountId);
|
||||
|
||||
if(!session || !session->GetPlayer())
|
||||
return;
|
||||
|
||||
ignoreResult = FRIEND_IGNORE_NOT_FOUND;
|
||||
IgnoreGuid = 0;
|
||||
|
||||
FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND;
|
||||
if(IgnoreGuid)
|
||||
if(result)
|
||||
{
|
||||
if(IgnoreGuid==session->GetPlayer()->GetGUID()) //not add yourself
|
||||
ignoreResult = FRIEND_IGNORE_SELF;
|
||||
else if( session->GetPlayer()->GetSocial()->HasIgnore(GUID_LOPART(IgnoreGuid)) )
|
||||
ignoreResult = FRIEND_IGNORE_ALREADY;
|
||||
else
|
||||
{
|
||||
ignoreResult = FRIEND_IGNORE_ADDED;
|
||||
IgnoreGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
|
||||
// ignore list full
|
||||
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(IgnoreGuid), true))
|
||||
ignoreResult = FRIEND_IGNORE_FULL;
|
||||
delete result;
|
||||
|
||||
if(IgnoreGuid)
|
||||
{
|
||||
if(IgnoreGuid==session->GetPlayer()->GetGUID()) //not add yourself
|
||||
ignoreResult = FRIEND_IGNORE_SELF;
|
||||
else if( session->GetPlayer()->GetSocial()->HasIgnore(GUID_LOPART(IgnoreGuid)) )
|
||||
ignoreResult = FRIEND_IGNORE_ALREADY;
|
||||
else
|
||||
{
|
||||
ignoreResult = FRIEND_IGNORE_ADDED;
|
||||
|
||||
// ignore list full
|
||||
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(IgnoreGuid), true))
|
||||
ignoreResult = FRIEND_IGNORE_FULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+44
-24
@@ -55,10 +55,13 @@ MotionMaster::Initialize()
|
||||
{
|
||||
MovementGenerator* movement = FactorySelector::selectMovementGenerator((Creature*)i_owner);
|
||||
push( movement == NULL ? &si_idleMovement : movement );
|
||||
top()->Initialize(*i_owner);
|
||||
InitTop();
|
||||
}
|
||||
else
|
||||
{
|
||||
push(&si_idleMovement);
|
||||
needInit[MOTION_SLOT_IDLE] = false;
|
||||
}
|
||||
}
|
||||
|
||||
MotionMaster::~MotionMaster()
|
||||
@@ -98,35 +101,37 @@ MotionMaster::UpdateMotion(uint32 diff)
|
||||
delete m_expList;
|
||||
m_expList = NULL;
|
||||
|
||||
if (empty())
|
||||
if(empty())
|
||||
Initialize();
|
||||
|
||||
if (m_cleanFlag & MMCF_RESET)
|
||||
{
|
||||
else if(needInitTop())
|
||||
InitTop();
|
||||
else if (m_cleanFlag & MMCF_RESET)
|
||||
top()->Reset(*i_owner);
|
||||
m_cleanFlag &= ~MMCF_RESET;
|
||||
}
|
||||
|
||||
m_cleanFlag &= ~MMCF_RESET;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MotionMaster::DirectClean(bool reset)
|
||||
{
|
||||
while( !empty() && size() > 1 )
|
||||
while(size() > 1)
|
||||
{
|
||||
MovementGenerator *curr = top();
|
||||
pop();
|
||||
if(curr) DirectDelete(curr);
|
||||
}
|
||||
|
||||
if(reset)
|
||||
if(needInitTop())
|
||||
InitTop();
|
||||
else if(reset)
|
||||
top()->Reset(*i_owner);
|
||||
}
|
||||
|
||||
void
|
||||
MotionMaster::DelayedClean()
|
||||
{
|
||||
while( !empty() && size() > 1 )
|
||||
while(size() > 1)
|
||||
{
|
||||
MovementGenerator *curr = top();
|
||||
pop();
|
||||
@@ -137,31 +142,33 @@ MotionMaster::DelayedClean()
|
||||
void
|
||||
MotionMaster::DirectExpire(bool reset)
|
||||
{
|
||||
if( empty() || size() == 1 )
|
||||
return;
|
||||
|
||||
MovementGenerator *curr = top();
|
||||
pop();
|
||||
DirectDelete(curr);
|
||||
if(size() > 1 )
|
||||
{
|
||||
MovementGenerator *curr = top();
|
||||
pop();
|
||||
DirectDelete(curr);
|
||||
}
|
||||
|
||||
while(!top())
|
||||
--i_top;
|
||||
|
||||
if(empty())
|
||||
Initialize();
|
||||
if(reset)
|
||||
else if(needInitTop())
|
||||
InitTop();
|
||||
else if(reset)
|
||||
top()->Reset(*i_owner);
|
||||
}
|
||||
|
||||
void
|
||||
MotionMaster::DelayedExpire()
|
||||
{
|
||||
if( empty() || size() == 1 )
|
||||
return;
|
||||
|
||||
MovementGenerator *curr = top();
|
||||
pop();
|
||||
DelayedDelete(curr);
|
||||
if(size() > 1 )
|
||||
{
|
||||
MovementGenerator *curr = top();
|
||||
pop();
|
||||
DelayedDelete(curr);
|
||||
}
|
||||
|
||||
while(!top())
|
||||
--i_top;
|
||||
@@ -396,7 +403,14 @@ void MotionMaster::Mutate(MovementGenerator *m, MovementSlot slot)
|
||||
{
|
||||
i_top = slot;
|
||||
}
|
||||
m->Initialize(*i_owner);
|
||||
|
||||
if(i_top > slot)
|
||||
needInit[slot] = true;
|
||||
else
|
||||
{
|
||||
m->Initialize(*i_owner);
|
||||
needInit[slot] = false;
|
||||
}
|
||||
Impl[slot] = m;
|
||||
}
|
||||
|
||||
@@ -446,6 +460,12 @@ MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType() const
|
||||
return top()->GetMovementGeneratorType();
|
||||
}
|
||||
|
||||
void MotionMaster::InitTop()
|
||||
{
|
||||
top()->Initialize(*i_owner);
|
||||
needInit[i_top] = false;
|
||||
}
|
||||
|
||||
void MotionMaster::DirectDelete(_Ty curr)
|
||||
{
|
||||
if(isStatic(curr))
|
||||
|
||||
@@ -68,18 +68,25 @@ class TRINITY_DLL_SPEC MotionMaster //: private std::stack<MovementGenerator *>
|
||||
//typedef std::stack<MovementGenerator *> Impl;
|
||||
typedef MovementGenerator* _Ty;
|
||||
_Ty Impl[MAX_MOTION_SLOT];
|
||||
bool needInit[MAX_MOTION_SLOT];
|
||||
typedef std::vector<_Ty> ExpireList;
|
||||
int i_top;
|
||||
|
||||
bool empty() const { return i_top < 0; }
|
||||
void pop() { Impl[i_top] = NULL; --i_top; }
|
||||
void push(_Ty _Val) { ++i_top; Impl[i_top] = _Val; }
|
||||
|
||||
bool needInitTop() const { return needInit[i_top]; }
|
||||
void InitTop();
|
||||
public:
|
||||
|
||||
explicit MotionMaster(Unit *unit) : i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE), i_top(-1)
|
||||
{
|
||||
for(int i = 0; i < MAX_MOTION_SLOT; ++i)
|
||||
{
|
||||
Impl[i] = NULL;
|
||||
needInit[i] = true;
|
||||
}
|
||||
}
|
||||
~MotionMaster();
|
||||
|
||||
|
||||
@@ -1101,6 +1101,7 @@ WorldObject::WorldObject()
|
||||
mSemaphoreTeleport = false;
|
||||
|
||||
m_isActive = false;
|
||||
IsTempWorldObject = false;
|
||||
}
|
||||
|
||||
void WorldObject::SetWorldObject(bool on)
|
||||
|
||||
@@ -506,6 +506,8 @@ class TRINITY_DLL_SPEC WorldObject : public Object
|
||||
template<class NOTIFIER> void VisitNearbyObject(const float &radius, NOTIFIER ¬ifier) const { GetMap()->VisitAll(GetPositionX(), GetPositionY(), radius, notifier); }
|
||||
template<class NOTIFIER> void VisitNearbyGridObject(const float &radius, NOTIFIER ¬ifier) const { GetMap()->VisitGrid(GetPositionX(), GetPositionY(), radius, notifier); }
|
||||
template<class NOTIFIER> void VisitNearbyWorldObject(const float &radius, NOTIFIER ¬ifier) const { GetMap()->VisitWorld(GetPositionX(), GetPositionY(), radius, notifier); }
|
||||
bool IsTempWorldObject;
|
||||
|
||||
protected:
|
||||
explicit WorldObject();
|
||||
std::string m_name;
|
||||
|
||||
@@ -2298,6 +2298,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
case 38296: //Spitfire Totem
|
||||
case 37676: //Insidious Whisper
|
||||
case 46009: //Negative Energy
|
||||
case 45641: //Fire Bloom
|
||||
spellInfo->MaxAffectedTargets = 5;
|
||||
break;
|
||||
case 40827: //Sinful Beam
|
||||
|
||||
+8
-5
@@ -7868,19 +7868,23 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
|
||||
|
||||
void Unit::AddPlayerToVision(Player* plr)
|
||||
{
|
||||
setActive(true);
|
||||
if(m_sharedVision.empty())
|
||||
{
|
||||
setActive(true);
|
||||
SetWorldObject(true);
|
||||
}
|
||||
m_sharedVision.push_back(plr);
|
||||
plr->SetFarsightTarget(this);
|
||||
}
|
||||
|
||||
void Unit::RemovePlayerFromVision(Player* plr)
|
||||
{
|
||||
setActive(false);
|
||||
m_sharedVision.remove(plr);
|
||||
if(m_sharedVision.empty())
|
||||
{
|
||||
setActive(false);
|
||||
SetWorldObject(false);
|
||||
}
|
||||
plr->ClearFarsight();
|
||||
}
|
||||
|
||||
@@ -8695,7 +8699,8 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||
spellProto->Id == 33778 || spellProto->Id == 379 ||
|
||||
spellProto->Id == 38395 || spellProto->Id == 40972 ||
|
||||
spellProto->Id == 22845 || spellProto->Id == 33504 ||
|
||||
spellProto->Id == 34299)
|
||||
spellProto->Id == 34299 || spellProto->Id == 27813 ||
|
||||
spellProto->Id == 27817 || spellProto->Id == 27818)
|
||||
return healamount;
|
||||
|
||||
// Healing Done
|
||||
@@ -12364,7 +12369,6 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
|
||||
// FORM_SPIRITOFREDEMPTION and related auras
|
||||
pVictim->CastSpell(pVictim,27827,true,NULL,*itr);
|
||||
pVictim->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // should not be attackable
|
||||
SpiritOfRedemption = true;
|
||||
break;
|
||||
}
|
||||
@@ -12375,7 +12379,6 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
{
|
||||
DEBUG_LOG("SET JUST_DIED");
|
||||
pVictim->setDeathState(JUST_DIED);
|
||||
pVictim->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // reactive attackable flag
|
||||
}
|
||||
|
||||
// 10% durability loss on death
|
||||
|
||||
Reference in New Issue
Block a user