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-04-04 14:24:32 +07:00
parent ac66fc7f42
commit 674242da54
2 changed files with 0 additions and 10 deletions
-8
View File
@@ -327,14 +327,6 @@ void CCallback::castSpell(const CGHeroInstance *hero, SpellID spellID, const int
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)
{
if(s1->getCreature(p1) == s2->getCreature(p2))
-2
View File
@@ -115,8 +115,6 @@ public:
void unregisterGameInterface(std::shared_ptr<IGameEventsReceiver> gameEvents);
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
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);