CvLuaUnit::lIsRecalledTrader(lua_State *)
- Defined in
- Lua/CvLuaUnit.cpp, line 2532
- Class
- CvLuaUnit
- Not a hook point
- member without a separate declaration
Code
2532int CvLuaUnit::lIsRecalledTrader(lua_State* L)2533{2534 CvUnit* pkUnit = GetInstance(L);2535 bool bRecalled = false;25362537 if (pkUnit->isTrade()) {2538 CvGameTrade* pkTrades = GC.getGame().GetGameTrade();2539 int iRouteIndex = pkTrades->GetIndexFromUnitID(pkUnit->GetID(), pkUnit->getOwner());2540 if (iRouteIndex >= 0) {2541 bRecalled = pkTrades->IsRecalledUnit(iRouteIndex);2542 }2543 }25442545 lua_pushboolean(L, bRecalled);2546 return 1;2547}