CvCity::swapOrder(int)
- Defined in
- CvCity.cpp, line 13392
- Class
- CvCity
- Hook name
CivHooks::CvCity_swapOrder
Hooks
static bool BeforeCvCity_swapOrder(CvCity* self, int iNum);static void AfterCvCity_swapOrder(CvCity* self, int iNum);static void ReplaceCvCity_swapOrder(void (*original)(CvCity*, int), CvCity* self, int iNum);CivRegisterBefore<CivHooks::CvCity_swapOrder>(host, &BeforeCvCity_swapOrder);CivRegisterAfter<CivHooks::CvCity_swapOrder>(host, &AfterCvCity_swapOrder);CivRegisterReplace<CivHooks::CvCity_swapOrder>(host, &ReplaceCvCity_swapOrder);
Code
13392void CvCity::swapOrder(int iNum)13393{13394 // okay, this only swaps the order with the next one up in the queue13395 VALIDATE_OBJECT1339613397 if(iNum == 0)13398 {13399 stopHeadOrder();13400 }1340113402 m_orderQueue.swapUp(iNum);1340313404 if(iNum == 0)13405 {13406 startHeadOrder();13407 }1340813409 if((getTeam() == GC.getGame().getActiveTeam()) || GC.getGame().isDebugMode())13410 {13411 if(isCitySelected())13412 {13413 //DLLUI->setDirty(InfoPane_DIRTY_BIT, true );13414 DLLUI->setDirty(SelectionButtons_DIRTY_BIT, true);13415 DLLUI->setDirty(CityScreen_DIRTY_BIT, true);13416 DLLUI->setDirty(PlotListButtons_DIRTY_BIT, true);13417 }13418 DLLUI->setDirty(CityInfo_DIRTY_BIT, true);13419 }13420}
Calls
- CvCity::getTeam() const
- CvCity::isCitySelected()
- CvCity::startHeadOrder()
- CvCity::stopHeadOrder()
- CvGame::getActiveTeam()
- CvGame::isDebugMode() const
- CvGlobals::GetEngineUserInterface()
- CvGlobals::getGame()
FFastSmallFixedList::swapUpICvUserInterface1::setDirty