diff options
| author | megamage <none@none> | 2009-08-20 16:06:03 -0500 | 
|---|---|---|
| committer | megamage <none@none> | 2009-08-20 16:06:03 -0500 | 
| commit | 5f04f0c1f02ae3029ff9db47b242071774cb7c15 (patch) | |
| tree | 2df00961df2019daf7bc05adb8482817e9c83afb /src/game/Wintergrasp.cpp | |
| parent | 6606a82509d76b9afb57a2ed664355ba3f179dd6 (diff) | |
*Only allow to build new vehicles during wartime in wintergrasp.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Wintergrasp.cpp')
| -rw-r--r-- | src/game/Wintergrasp.cpp | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp index 486d8ed383e..a6b633cfa21 100644 --- a/src/game/Wintergrasp.cpp +++ b/src/game/Wintergrasp.cpp @@ -380,13 +380,14 @@ void OPvPWintergrasp::OnCreatureCreate(Creature *creature, bool add)                      {                          if(add)                          { -                            if(workshop->m_vehicles.size() >= MAX_VEHICLE_PER_WORKSHOP) +                            if(m_wartime && workshop->m_vehicles.size() < MAX_VEHICLE_PER_WORKSHOP) +                                workshop->m_vehicles.insert((Vehicle*)creature); +                            else                              {                                  creature->setDeathState(DEAD);                                  creature->SetRespawnTime(DAY);                                  return; -                            } -                            workshop->m_vehicles.insert((Vehicle*)creature); +                            }                                                      }                          // TODO: now you have to wait until the corpse of vehicle disappear to build a new one                          else if(!workshop->m_vehicles.erase((Vehicle*)creature)) @@ -768,7 +769,7 @@ uint32 OPvPWintergrasp::GetData(uint32 id)  {      // if can build more vehicles      if(SiegeWorkshop *workshop = GetWorkshopByEngGuid(id)) -        return workshop->m_vehicles.size() < MAX_VEHICLE_PER_WORKSHOP ? 1 : 0; +        return m_wartime && workshop->m_vehicles.size() < MAX_VEHICLE_PER_WORKSHOP ? 1 : 0;      return 0;  }  | 
