diff options
author | Blaymoira <none@none> | 2009-03-07 00:25:10 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-03-07 00:25:10 +0100 |
commit | ae540b526bb3c0ca3c5d910da515030233f8ea55 (patch) | |
tree | be4a56df017c1845e4421dd3c4fb144e3efd899f /src | |
parent | b49732c04db0d5bf67bf78e73e9c22f2078fd47c (diff) |
*Prevent to pick both of the flags when they are on the ground - by Klaimmore
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/BattleGroundWS.cpp | 4 | ||||
-rw-r--r-- | src/game/BattleGroundWS.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index 500b00feb46..3a8c5668a7a 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -441,7 +441,7 @@ void BattleGroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target } //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)) + 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(Source->GetTeam() == ALLIANCE) { @@ -470,7 +470,7 @@ void BattleGroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target } //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)) + 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(Source->GetTeam() == HORDE) { diff --git a/src/game/BattleGroundWS.h b/src/game/BattleGroundWS.h index b86ce2054cc..c804c250209 100644 --- a/src/game/BattleGroundWS.h +++ b/src/game/BattleGroundWS.h @@ -101,7 +101,9 @@ enum BG_WS_ObjectEntry BG_OBJECT_DOOR_H_3_WS_ENTRY = 180322, BG_OBJECT_DOOR_H_4_WS_ENTRY = 180322, BG_OBJECT_A_FLAG_WS_ENTRY = 179830, - BG_OBJECT_H_FLAG_WS_ENTRY = 179831 + BG_OBJECT_H_FLAG_WS_ENTRY = 179831, + BG_OBJECT_A_FLAG_GROUND_WS_ENTRY = 179785, + BG_OBJECT_H_FLAG_GROUND_WS_ENTRY = 179786 }; enum BG_WS_FlagState |