فهرست منبع

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.
Arseniy Shestakov 7 سال پیش
والد
کامیت
674242da54
2فایلهای تغییر یافته به همراه0 افزوده شده و 10 حذف شده
  1. 0 8
      CCallback.cpp
  2. 0 2
      CCallback.h

+ 0 - 8
CCallback.cpp

@@ -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))

+ 0 - 2
CCallback.h

@@ -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);