@@ -185,7 +185,7 @@ const IMarket * CGameInfoCallback::getMarket(ObjectInstanceID objid) const
185
185
186
186
void CGameInfoCallback::fillUpgradeInfo (const CArmedInstance *obj, SlotID stackPos, UpgradeInfo & out) const
187
187
{
188
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
188
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
189
189
ERROR_RET_IF (!canGetFullInfo (obj), " Cannot get info about not owned object!" );
190
190
ERROR_RET_IF (!obj->hasStackAtSlot (stackPos), " There is no such stack!" );
191
191
gs->fillUpgradeInfo (obj, stackPos, out);
@@ -194,7 +194,7 @@ void CGameInfoCallback::fillUpgradeInfo(const CArmedInstance *obj, SlotID stackP
194
194
195
195
const StartInfo * CGameInfoCallback::getStartInfo (bool beforeRandomization) const
196
196
{
197
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
197
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
198
198
if (beforeRandomization)
199
199
return gs->initialOpts ;
200
200
else
@@ -203,7 +203,7 @@ const StartInfo * CGameInfoCallback::getStartInfo(bool beforeRandomization) cons
203
203
204
204
int32_t CGameInfoCallback::getSpellCost (const spells::Spell * sp, const CGHeroInstance * caster) const
205
205
{
206
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
206
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
207
207
ERROR_RET_VAL_IF (!canGetFullInfo (caster), " Cannot get info about caster!" , -1 );
208
208
// if there is a battle
209
209
auto casterBattle = gs->getBattle (caster->getOwner ());
@@ -217,7 +217,7 @@ int32_t CGameInfoCallback::getSpellCost(const spells::Spell * sp, const CGHeroIn
217
217
218
218
int64_t CGameInfoCallback::estimateSpellDamage (const CSpell * sp, const CGHeroInstance * hero) const
219
219
{
220
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
220
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
221
221
222
222
ERROR_RET_VAL_IF (hero && !canGetFullInfo (hero), " Cannot get info about caster!" , -1 );
223
223
@@ -229,7 +229,7 @@ int64_t CGameInfoCallback::estimateSpellDamage(const CSpell * sp, const CGHeroIn
229
229
230
230
void CGameInfoCallback::getThievesGuildInfo (SThievesGuildInfo & thi, const CGObjectInstance * obj)
231
231
{
232
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
232
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
233
233
ERROR_RET_IF (!obj, " No guild object!" );
234
234
ERROR_RET_IF (obj->ID == Obj::TOWN && !canGetFullInfo (obj), " Cannot get info about town guild object!" );
235
235
// TODO: advmap object -> check if they're visited by our hero
@@ -419,13 +419,13 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
419
419
420
420
int CGameInfoCallback::getDate (Date mode) const
421
421
{
422
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
422
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
423
423
return gs->getDate (mode);
424
424
}
425
425
426
426
bool CGameInfoCallback::isVisible (int3 pos, const std::optional<PlayerColor> & Player) const
427
427
{
428
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
428
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
429
429
return gs->isVisible (pos, Player);
430
430
}
431
431
@@ -445,7 +445,7 @@ bool CGameInfoCallback::isVisible(const CGObjectInstance *obj) const
445
445
}
446
446
// const CCreatureSet* CInfoCallback::getGarrison(const CGObjectInstance *obj) const
447
447
// {
448
- // //std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
448
+ // //std::shared_lock<std ::shared_mutex> lock(*gs->mx);
449
449
// if()
450
450
// const CArmedInstance *armi = dynamic_cast<const CArmedInstance*>(obj);
451
451
// if(!armi)
@@ -754,14 +754,14 @@ CGameInfoCallback::CGameInfoCallback(CGameState * GS):
754
754
755
755
int CPlayerSpecificInfoCallback::howManyTowns () const
756
756
{
757
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
757
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
758
758
ERROR_RET_VAL_IF (!getPlayerID (), " Applicable only for player callbacks" , -1 );
759
759
return CGameInfoCallback::howManyTowns (*getPlayerID ());
760
760
}
761
761
762
762
std::vector < const CGTownInstance *> CPlayerSpecificInfoCallback::getTownsInfo (bool onlyOur) const
763
763
{
764
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
764
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
765
765
auto ret = std::vector < const CGTownInstance *>();
766
766
for (const auto & i : gs->players )
767
767
{
@@ -777,7 +777,7 @@ std::vector < const CGTownInstance *> CPlayerSpecificInfoCallback::getTownsInfo(
777
777
}
778
778
std::vector < const CGHeroInstance *> CPlayerSpecificInfoCallback::getHeroesInfo (bool onlyOur) const
779
779
{
780
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
780
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
781
781
std::vector < const CGHeroInstance *> ret;
782
782
for (auto hero : gs->map ->heroesOnMap )
783
783
{
@@ -840,7 +840,7 @@ std::vector <QuestInfo> CPlayerSpecificInfoCallback::getMyQuests() const
840
840
841
841
int CPlayerSpecificInfoCallback::howManyHeroes (bool includeGarrisoned) const
842
842
{
843
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
843
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
844
844
ERROR_RET_VAL_IF (!getPlayerID (), " Applicable only for player callbacks" , -1 );
845
845
return getHeroCount (*getPlayerID (), includeGarrisoned);
846
846
}
@@ -872,14 +872,14 @@ const CGTownInstance* CPlayerSpecificInfoCallback::getTownBySerial(int serialId)
872
872
873
873
int CPlayerSpecificInfoCallback::getResourceAmount (GameResID type) const
874
874
{
875
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
875
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
876
876
ERROR_RET_VAL_IF (!getPlayerID (), " Applicable only for player callbacks" , -1 );
877
877
return getResource (*getPlayerID (), type);
878
878
}
879
879
880
880
TResources CPlayerSpecificInfoCallback::getResourceAmount () const
881
881
{
882
- // std::shared_lock<boost ::shared_mutex> lock(*gs->mx);
882
+ // std::shared_lock<std ::shared_mutex> lock(*gs->mx);
883
883
ERROR_RET_VAL_IF (!getPlayerID (), " Applicable only for player callbacks" , TResources ());
884
884
return gs->players [*getPlayerID ()].resources ;
885
885
}
0 commit comments