*Use total max veh number instead of max veh number per workshop to check if can build vehicle in wintergrasp.

*Do not despawn vehicles when workshop is destroyed or captured.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-21 12:51:11 -05:00
parent 49abc30089
commit ae1450031f
2 changed files with 37 additions and 18 deletions
+5 -3
View File
@@ -187,6 +187,8 @@ class OPvPWintergrasp : public OutdoorPvP
bool UpdateCreatureInfo(Creature *creature) const;
bool UpdateGameObjectInfo(GameObject *go) const;
bool CanBuildVehicle(SiegeWorkshop *workshop) const;
void RebuildAllBuildings();
void VehicleCastSpell(TeamId team, int32 spellId) const;
@@ -201,15 +203,15 @@ class SiegeWorkshop : public OPvPCapturePoint
void SetTeamByBuildingState();
void ChangeState() {}
void ChangeTeam(TeamId oldteam);
void DespawnAllVehicles();
//void DespawnAllVehicles();
bool CanBuildVehicle() const { return m_vehicles.size() < MAX_VEHICLE_PER_WORKSHOP && m_buildingState->damageState != DAMAGE_DESTROYED; }
//bool CanBuildVehicle() const { return m_vehicles.size() < MAX_VEHICLE_PER_WORKSHOP && m_buildingState->damageState != DAMAGE_DESTROYED; }
uint32 *m_engEntry;
uint32 m_engGuid;
Creature *m_engineer;
uint32 m_workshopGuid;
VehicleSet m_vehicles;
//VehicleSet m_vehicles;
BuildingState *m_buildingState;
protected:
OPvPWintergrasp *m_wintergrasp;