[7632] more "if"-condition related codestyle in battlegroundfiles Author: balrok,Triply
this time with this regex:
sed -i 's/if *( *\(.*\) *)$/if (\1)/' BattleGround*
--HG--
branch : trunk
This commit is contained in:
@@ -358,7 +358,7 @@ void BattleGroundEY::RemovePlayer(Player *plr, uint64 guid)
|
|||||||
if (m_FlagKeeper == guid)
|
if (m_FlagKeeper == guid)
|
||||||
{
|
{
|
||||||
if (plr)
|
if (plr)
|
||||||
this->EventPlayerDroppedFlag(plr);
|
EventPlayerDroppedFlag(plr);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetFlagPicker(0);
|
SetFlagPicker(0);
|
||||||
@@ -621,7 +621,7 @@ void BattleGroundEY::EventPlayerDroppedFlag(Player *Source)
|
|||||||
|
|
||||||
void BattleGroundEY::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj)
|
void BattleGroundEY::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj)
|
||||||
{
|
{
|
||||||
if(GetStatus() != STATUS_IN_PROGRESS || this->IsFlagPickedup() || !Source->IsWithinDistInMap(target_obj, 10))
|
if (GetStatus() != STATUS_IN_PROGRESS || IsFlagPickedup() || !Source->IsWithinDistInMap(target_obj, 10))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Source->GetTeam() == ALLIANCE)
|
if (Source->GetTeam() == ALLIANCE)
|
||||||
@@ -748,7 +748,7 @@ void BattleGroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point)
|
|||||||
|
|
||||||
void BattleGroundEY::EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType)
|
void BattleGroundEY::EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType)
|
||||||
{
|
{
|
||||||
if(GetStatus() != STATUS_IN_PROGRESS || this->GetFlagPickerGUID() != Source->GetGUID())
|
if (GetStatus() != STATUS_IN_PROGRESS || GetFlagPickerGUID() != Source->GetGUID())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SetFlagPicker(0);
|
SetFlagPicker(0);
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ void BattleGroundWS::EventPlayerDroppedFlag(Player *Source)
|
|||||||
|
|
||||||
if (Source->GetTeam() == ALLIANCE)
|
if (Source->GetTeam() == ALLIANCE)
|
||||||
{
|
{
|
||||||
if(!this->IsHordeFlagPickedup())
|
if (!IsHordeFlagPickedup())
|
||||||
return;
|
return;
|
||||||
if (GetHordeFlagPickerGUID() == Source->GetGUID())
|
if (GetHordeFlagPickerGUID() == Source->GetGUID())
|
||||||
{
|
{
|
||||||
@@ -319,7 +319,7 @@ void BattleGroundWS::EventPlayerDroppedFlag(Player *Source)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!this->IsAllianceFlagPickedup())
|
if (!IsAllianceFlagPickedup())
|
||||||
return;
|
return;
|
||||||
if (GetAllianceFlagPickerGUID() == Source->GetGUID())
|
if (GetAllianceFlagPickerGUID() == Source->GetGUID())
|
||||||
{
|
{
|
||||||
@@ -392,7 +392,7 @@ void BattleGroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Alliance flag on ground(not in base) (returned or picked up again from ground!)
|
//Alliance flag on ground(not in base) (returned or picked up again from ground!)
|
||||||
if(this->GetFlagState(ALLIANCE) == BG_WS_FLAG_STATE_ON_GROUND && Source->IsWithinDistInMap(target_obj, 10) && target_obj->GetGOInfo()->id == BG_OBJECT_A_FLAG_GROUND_WS_ENTRY)
|
if (GetFlagState(ALLIANCE) == BG_WS_FLAG_STATE_ON_GROUND && Source->IsWithinDistInMap(target_obj, 10))
|
||||||
{
|
{
|
||||||
if (Source->GetTeam() == ALLIANCE)
|
if (Source->GetTeam() == ALLIANCE)
|
||||||
{
|
{
|
||||||
@@ -421,7 +421,7 @@ void BattleGroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Horde flag on ground(not in base) (returned or picked up again)
|
//Horde flag on ground(not in base) (returned or picked up again)
|
||||||
if(this->GetFlagState(HORDE) == BG_WS_FLAG_STATE_ON_GROUND && Source->IsWithinDistInMap(target_obj, 10) && target_obj->GetGOInfo()->id == BG_OBJECT_H_FLAG_GROUND_WS_ENTRY)
|
if (GetFlagState(HORDE) == BG_WS_FLAG_STATE_ON_GROUND && Source->IsWithinDistInMap(target_obj, 10))
|
||||||
{
|
{
|
||||||
if (Source->GetTeam() == HORDE)
|
if (Source->GetTeam() == HORDE)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user