*Fix a 100% crash caused by duel.
--HG-- branch : trunk
This commit is contained in:
+6
-4
@@ -6273,6 +6273,8 @@ void Player::DuelComplete(DuelCompleteType type)
|
|||||||
if(!duel)
|
if(!duel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
sLog.outDebug("Dual Complete %s %s", GetName(), duel->opponent->GetName());
|
||||||
|
|
||||||
WorldPacket data(SMSG_DUEL_COMPLETE, (1));
|
WorldPacket data(SMSG_DUEL_COMPLETE, (1));
|
||||||
data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0);
|
data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0);
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
@@ -6309,8 +6311,8 @@ void Player::DuelComplete(DuelCompleteType type)
|
|||||||
duel->initiator->RemoveGameObject(obj,true);
|
duel->initiator->RemoveGameObject(obj,true);
|
||||||
|
|
||||||
/* remove auras */
|
/* remove auras */
|
||||||
AuraMap & vAuras = duel->opponent->GetAuras();
|
AuraMap &itsAuras = duel->opponent->GetAuras();
|
||||||
for(AuraMap::iterator i = vAuras.begin(); i != vAuras.end();)
|
for(AuraMap::iterator i = itsAuras.begin(); i != itsAuras.end();)
|
||||||
{
|
{
|
||||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
if (!i->second->IsPositive() && i->second->GetCasterGUID() == GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||||
{
|
{
|
||||||
@@ -6320,8 +6322,8 @@ void Player::DuelComplete(DuelCompleteType type)
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
vAuras = GetAuras();
|
AuraMap &myAuras = GetAuras();
|
||||||
for(AuraMap::iterator i = vAuras.begin(); i != vAuras.end();)
|
for(AuraMap::iterator i = myAuras.begin(); i != myAuras.end();)
|
||||||
{
|
{
|
||||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == duel->opponent->GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
if (!i->second->IsPositive() && i->second->GetCasterGUID() == duel->opponent->GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user