mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
show statistics ingame
This commit is contained in:
@@ -392,6 +392,12 @@ void CCallback::castSpell(const CGHeroInstance *hero, SpellID spellID, const int
|
||||
sendRequest(cas);
|
||||
}
|
||||
|
||||
void CCallback::requestStatistic()
|
||||
{
|
||||
RequestStatistic sr;
|
||||
sendRequest(sr);
|
||||
}
|
||||
|
||||
int CCallback::mergeOrSwapStacks(const CArmedInstance *s1, const CArmedInstance *s2, SlotID p1, SlotID p2)
|
||||
{
|
||||
if(s1->getCreature(p1) == s2->getCreature(p2))
|
||||
|
||||
@@ -84,6 +84,7 @@ public:
|
||||
void buildBoat(const IShipyard *obj) override;
|
||||
void dig(const CGObjectInstance *hero) override;
|
||||
void castSpell(const CGHeroInstance *hero, SpellID spellID, const int3 &pos = int3(-1, -1, -1)) override;
|
||||
void requestStatistic() override;
|
||||
|
||||
//friends
|
||||
friend class CClient;
|
||||
|
||||
@@ -76,6 +76,7 @@ public:
|
||||
virtual void sendMessage(const std::string &mess, const CGObjectInstance * currentObject = nullptr) = 0;
|
||||
virtual void gamePause(bool pause) = 0;
|
||||
virtual void buildBoat(const IShipyard *obj) = 0;
|
||||
virtual void requestStatistic() = 0;
|
||||
|
||||
// To implement high-level army management bulk actions
|
||||
virtual int bulkMoveArmy(ObjectInstanceID srcArmy, ObjectInstanceID destArmy, SlotID srcSlot) = 0;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../constants/EntityIdentifiers.h"
|
||||
#include "../gameState/GameStatistics.h"
|
||||
#include "../int3.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
@@ -97,6 +98,8 @@ public:
|
||||
virtual void playerStartsTurn(PlayerColor player){};
|
||||
virtual void playerEndsTurn(PlayerColor player){};
|
||||
|
||||
virtual void responseStatistic(StatisticDataSet & statistic){};
|
||||
|
||||
//TODO shouldn't be moved down the tree?
|
||||
virtual void heroExchangeStarted(ObjectInstanceID hero1, ObjectInstanceID hero2, QueryID queryID){};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user