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:
parent
ac66fc7f42
commit
674242da54
@ -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))
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user