1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

CCallback: remove unregisterAllInterfaces

Not needed since CPlayerInterface no longer handle interface removal.
It's far better when CClient::endGame doing it since they owned by CClient.
This commit is contained in:
Arseniy Shestakov 2018-02-05 15:20:56 +03:00
parent ac66fc7f42
commit 674242da54
2 changed files with 0 additions and 10 deletions

View File

@ -327,14 +327,6 @@ void CCallback::castSpell(const CGHeroInstance *hero, SpellID spellID, const int
sendRequest(&cas); sendRequest(&cas);
} }
void CCallback::unregisterAllInterfaces()
{
for (auto& pi : cl->playerint)
pi.second->finish();
cl->playerint.clear();
cl->battleints.clear();
}
int CCallback::mergeOrSwapStacks(const CArmedInstance *s1, const CArmedInstance *s2, SlotID p1, SlotID p2) int CCallback::mergeOrSwapStacks(const CArmedInstance *s1, const CArmedInstance *s2, SlotID p1, SlotID p2)
{ {
if(s1->getCreature(p1) == s2->getCreature(p2)) if(s1->getCreature(p1) == s2->getCreature(p2))

View File

@ -115,8 +115,6 @@ public:
void unregisterGameInterface(std::shared_ptr<IGameEventsReceiver> gameEvents); void unregisterGameInterface(std::shared_ptr<IGameEventsReceiver> gameEvents);
void unregisterBattleInterface(std::shared_ptr<IBattleEventsReceiver> battleEvents); void unregisterBattleInterface(std::shared_ptr<IBattleEventsReceiver> battleEvents);
void unregisterAllInterfaces(); //stops delivering information about game events to player interfaces -> can be called ONLY after victory/loss
//commands //commands
bool moveHero(const CGHeroInstance *h, int3 dst, bool transit = false) override; //dst must be free, neighbouring tile (this function can move hero only by one tile) bool moveHero(const CGHeroInstance *h, int3 dst, bool transit = false) override; //dst must be free, neighbouring tile (this function can move hero only by one tile)
bool teleportHero(const CGHeroInstance *who, const CGTownInstance *where); bool teleportHero(const CGHeroInstance *who, const CGTownInstance *where);