diff options
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2Tenant.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/T2DLL/T2Tenant.cpp b/src/T2DLL/T2Tenant.cpp index e1a63eb..cec110b 100644 --- a/src/T2DLL/T2Tenant.cpp +++ b/src/T2DLL/T2Tenant.cpp @@ -731,10 +731,10 @@ int T2Tenant::CollectCustomerFromPool(T2TowerDoc* inDoc, T2TenantMemberTableDef* int T2Tenant::CollectCustomerFromTenant(T2TowerDoc* inDoc, T2TenantMemberTableDef* inTable, unsigned int inTime) { int numCustomer = 0; - T2RouteNavigator *theNavigator = inDoc->towerDoc_vf124(); - T2Tenant *theTenant = theNavigator->SelectNearTenant(GetEntrancePt(), inTable->GetScore(T2PlaceParamDef::Place_1)); + T2RouteNavigator *theNavi = inDoc->towerDoc_vf124(); + T2Tenant *theNearTenant = theNavi->SelectNearTenant(GetEntrancePt(), inTable->GetScore(T2PlaceParamDef::Place_1)); - if (theTenant) { + if (theNearTenant) { unsigned int restCapacity = CalcRestCapacity(); int econoType = inTable->GetEconoType(); unsigned int theSpecialFlag = inTable->GetSpecialFlag(); @@ -743,7 +743,7 @@ int T2Tenant::CollectCustomerFromTenant(T2TowerDoc* inDoc, T2TenantMemberTableDe T2TenantMemberDef *memberDef; unsigned int theRate; - T2PeopleLinkIterator peopleLinkIterator(theTenant->GetFirstPeople()); + T2PeopleLinkIterator peopleLinkIterator(theNearTenant->GetFirstPeople()); T2People *people; int time = GetBindTime(); @@ -774,9 +774,9 @@ int T2Tenant::CollectCustomerFromFloor(T2TowerDoc* inDoc, T2TenantMemberTableDef T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C(); unsigned int theEntranceFloorID = GetEntranceFloorID(); - T2Tenant *theEntranceFloor = theFloorInfo->GetTenant(theEntranceFloorID); + T2Tenant *theFloor = theFloorInfo->GetTenant(theEntranceFloorID); - if (theEntranceFloor->IsTherePeople()) { + if (theFloor->IsTherePeople()) { unsigned int restCapacity = CalcRestCapacity(); int searchScore = inTable->GetScore(T2PlaceParamDef::Place_2); int econoType = inTable->GetEconoType(); @@ -786,7 +786,7 @@ int T2Tenant::CollectCustomerFromFloor(T2TowerDoc* inDoc, T2TenantMemberTableDef T2TenantMemberDef *memberDef; unsigned int theRate; - T2PeopleLinkIterator peopleLinkIterator(theEntranceFloor->GetFirstPeople()); + T2PeopleLinkIterator peopleLinkIterator(theFloor->GetFirstPeople()); T2People *people; int time = GetBindTime(); @@ -1297,18 +1297,18 @@ BOOL T2Tenant::IsWithinSearchRange(T2TowerDoc* inDoc, T2Tenant* inTenant) const BOOL result = false; if (inTenant) { - T2RouteNavigator *theNavigator = inDoc->towerDoc_vf124(); + T2RouteNavigator *theNavi = inDoc->towerDoc_vf124(); T2TenantMemberTableDef *theTable = inTenant->GetCustomerTableDef(true); if (theTable) { if (IsFloor()) { if (GetValiation() == 1) { - if (theNavigator->IsConnectRouteFromLobby(inTenant->GetEntrancePt())) + if (theNavi->IsConnectRouteFromLobby(inTenant->GetEntrancePt())) result = true; } } else { int score = theTable->GetScore(T2PlaceParamDef::Place_1); - if (theNavigator->CheckRoute(inTenant->GetEntrancePt(), GetEntrancePt(), score)) + if (theNavi->CheckRoute(inTenant->GetEntrancePt(), GetEntrancePt(), score)) result = true; } } @@ -1588,44 +1588,44 @@ unsigned int T2Tenant::CheckRouteFromPool(T2TowerDoc* inDoc, unsigned int inScor unsigned int checkRoute = 0; T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C(); - T2RouteNavigator *theNavigator = inDoc->towerDoc_vf124(); + T2RouteNavigator *theNavi = inDoc->towerDoc_vf124(); POINT entrancePt = GetEntrancePt(); - if (theNavigator->CheckRoute(theFloorInfo->GetEntrancePt(1000), entrancePt, inScore)) + if (theNavi->CheckRoute(theFloorInfo->GetEntrancePt(1000), entrancePt, inScore)) checkRoute |= kTransportFlagLobbyLeft | kTransportFlagLobbyRight; T2RegistedTenantDB *theDB = inDoc->towerDoc_vf174(); - T2Tenant *theTenant = theDB->FindEmptyParking(); - if (theTenant) { - if (theNavigator->CheckRoute(theTenant->GetExitPt(), entrancePt, inScore)) + T2Tenant *theEmptyParking = theDB->FindEmptyParking(); + if (theEmptyParking) { + if (theNavi->CheckRoute(theEmptyParking->GetExitPt(), entrancePt, inScore)) checkRoute |= kTransportFlagParking; } - T2TowerEvent *towerEvent = inDoc->towerDoc_vf170()->GetTowerEvent(); - T2DateTime *theDateTime = inDoc->towerDoc_vf120(); - theTenant = theDB->GetFirstTenant(kTenantRegistID8); - if (theTenant && theTenant->IsOpen()) { - if (theNavigator->CheckRoute(theTenant->GetExitPt(), entrancePt, inScore)) + T2TowerEvent *theEvent = inDoc->towerDoc_vf170()->GetTowerEvent(); + T2DateTime *theCurrentDateTime = inDoc->towerDoc_vf120(); + theEmptyParking = theDB->GetFirstTenant(kTenantRegistID8); + if (theEmptyParking && theEmptyParking->IsOpen()) { + if (theNavi->CheckRoute(theEmptyParking->GetExitPt(), entrancePt, inScore)) checkRoute |= kTransportFlagSubway; } T2Transport *theTransport; if (checkRoute & kTransportFlagSubway) { - theTransport = towerEvent->GetMetroRailway(); - if (theTransport && !theTransport->GetAvailable(theDateTime) != NULL) + theTransport = theEvent->GetMetroRailway(); + if (theTransport && !theTransport->GetAvailable(theCurrentDateTime) != NULL) checkRoute &= ~kTransportFlagSubway; } - theTenant = theDB->GetFirstTenant(kTenantRegistID9); - if (theTenant && theTenant->IsOpen()) { - if (theNavigator->CheckRoute(theTenant->GetExitPt(), entrancePt, inScore)) + theEmptyParking = theDB->GetFirstTenant(kTenantRegistID9); + if (theEmptyParking && theEmptyParking->IsOpen()) { + if (theNavi->CheckRoute(theEmptyParking->GetExitPt(), entrancePt, inScore)) checkRoute |= kTransportFlagShip; } if (checkRoute & kTransportFlagShip) { - theTransport = towerEvent->GetCruise(); - if (theTransport && !theTransport->GetAvailable(theDateTime) != NULL) + theTransport = theEvent->GetCruise(); + if (theTransport && !theTransport->GetAvailable(theCurrentDateTime) != NULL) checkRoute &= ~kTransportFlagShip; } @@ -1692,12 +1692,12 @@ BOOL T2Tenant::UpdateResidencialEstimate(T2TowerDoc* inDoc) { return CalcEstimateColor() != oldCol; } -void T2Tenant::BreakoutEmergency(T2TowerDoc* inDoc) { +void T2Tenant::BreakoutEmergency(T2TowerDoc* inTowerDoc) { if (GetRegistID() != kTenantRegistID5) { - int result = GetEquipDef()->EmergencyProc(inDoc, this); + int result = GetEquipDef()->EmergencyProc(inTowerDoc, this); if (result) { SetDrawMode(result); - inDoc->GetTowerMainView()->tmv_vf128(mArea); + inTowerDoc->GetTowerMainView()->tmv_vf128(mArea); } } } |