--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-08 11:14:53 -06:00
2 changed files with 5 additions and 3 deletions

View File

@@ -405,7 +405,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)
{
@@ -434,7 +434,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)
{

View File

@@ -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