mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7460] Fixed possible cheating in rated arena by ressurection after relog.
Fix: Do not allow to remove insignia from players in arena! Fixed ending arena match when last player of team logs out. Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
parent
e4a5a47178
commit
7dd997617e
3 changed files with 10 additions and 5 deletions
|
|
@ -1200,7 +1200,11 @@ void BattleGround::EventPlayerLoggedOut(Player* player)
|
||||||
if( isBattleGround() )
|
if( isBattleGround() )
|
||||||
EventPlayerDroppedFlag(player);
|
EventPlayerDroppedFlag(player);
|
||||||
else
|
else
|
||||||
CheckArenaWinConditions();
|
{
|
||||||
|
//1 player is logging out, if it is the last, then end arena!
|
||||||
|
if( GetAlivePlayersCountByTeam(player->GetTeam()) <= 1 && GetPlayersCountByTeam(GetOtherTeam(player->GetTeam())) )
|
||||||
|
EndBattleGround(GetOtherTeam(player->GetTeam()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1668,7 +1672,8 @@ void BattleGround::HandleKillPlayer( Player *player, Player *killer )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// to be able to remove insignia
|
// to be able to remove insignia -- ONLY IN BattleGrounds
|
||||||
|
if( !isArena() )
|
||||||
player->SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE );
|
player->SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4044,7 +4044,7 @@ void Player::CreateCorpse()
|
||||||
flags |= CORPSE_FLAG_HIDE_HELM;
|
flags |= CORPSE_FLAG_HIDE_HELM;
|
||||||
if(HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK))
|
if(HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK))
|
||||||
flags |= CORPSE_FLAG_HIDE_CLOAK;
|
flags |= CORPSE_FLAG_HIDE_CLOAK;
|
||||||
if(InBattleGround())
|
if(InBattleGround() && !InArena())
|
||||||
flags |= CORPSE_FLAG_LOOTABLE; // to be able to remove insignia
|
flags |= CORPSE_FLAG_LOOTABLE; // to be able to remove insignia
|
||||||
corpse->SetUInt32Value( CORPSE_FIELD_FLAGS, flags );
|
corpse->SetUInt32Value( CORPSE_FIELD_FLAGS, flags );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7459"
|
#define REVISION_NR "7460"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue