1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00
This commit is contained in:
AlexVinS
2016-08-30 05:13:45 +03:00
parent 1c9dd41188
commit ef05a56e49
6 changed files with 27 additions and 29 deletions

View File

@@ -16,7 +16,7 @@
* *
*/ */
class CPack; struct CPack;
class CCampaignState; class CCampaignState;
class CBattleCallback; class CBattleCallback;
class IGameEventsReceiver; class IGameEventsReceiver;
@@ -175,9 +175,9 @@ public:
void setBlockVis(ObjectInstanceID objid, bool bv) override {}; void setBlockVis(ObjectInstanceID objid, bool bv) override {};
void setOwner(const CGObjectInstance * obj, PlayerColor owner) override {}; void setOwner(const CGObjectInstance * obj, PlayerColor owner) override {};
void changePrimSkill(const CGHeroInstance * hero, PrimarySkill::PrimarySkill which, si64 val, bool abs=false) override {}; void changePrimSkill(const CGHeroInstance * hero, PrimarySkill::PrimarySkill which, si64 val, bool abs=false) override {};
void changeSecSkill(const CGHeroInstance * hero, SecondarySkill which, int val, bool abs=false) override {}; void changeSecSkill(const CGHeroInstance * hero, SecondarySkill which, int val, bool abs=false) override {};
void showBlockingDialog(BlockingDialog *iw) override {}; void showBlockingDialog(BlockingDialog *iw) override {};
void showGarrisonDialog(ObjectInstanceID upobj, ObjectInstanceID hid, bool removableUnits) override {}; void showGarrisonDialog(ObjectInstanceID upobj, ObjectInstanceID hid, bool removableUnits) override {};
void showTeleportDialog(TeleportDialog *iw) override {}; void showTeleportDialog(TeleportDialog *iw) override {};
void showThievesGuildWindow(PlayerColor player, ObjectInstanceID requestingObjId) override {}; void showThievesGuildWindow(PlayerColor player, ObjectInstanceID requestingObjId) override {};
@@ -194,12 +194,12 @@ public:
bool addToSlot(const StackLocation &sl, const CCreature *c, TQuantity count) override {return false;} bool addToSlot(const StackLocation &sl, const CCreature *c, TQuantity count) override {return false;}
void tryJoiningArmy(const CArmedInstance *src, const CArmedInstance *dst, bool removeObjWhenFinished, bool allowMerging) override {} void tryJoiningArmy(const CArmedInstance *src, const CArmedInstance *dst, bool removeObjWhenFinished, bool allowMerging) override {}
bool moveStack(const StackLocation &src, const StackLocation &dst, TQuantity count = -1) override {return false;} bool moveStack(const StackLocation &src, const StackLocation &dst, TQuantity count = -1) override {return false;}
void removeAfterVisit(const CGObjectInstance *object) override {}; void removeAfterVisit(const CGObjectInstance *object) override {};
void giveHeroNewArtifact(const CGHeroInstance *h, const CArtifact *artType, ArtifactPosition pos) override {}; void giveHeroNewArtifact(const CGHeroInstance *h, const CArtifact *artType, ArtifactPosition pos) override {};
void giveHeroArtifact(const CGHeroInstance *h, const CArtifactInstance *a, ArtifactPosition pos) override {}; void giveHeroArtifact(const CGHeroInstance *h, const CArtifactInstance *a, ArtifactPosition pos) override {};
void putArtifact(const ArtifactLocation &al, const CArtifactInstance *a) override {}; void putArtifact(const ArtifactLocation &al, const CArtifactInstance *a) override {};
void removeArtifact(const ArtifactLocation &al) override {}; void removeArtifact(const ArtifactLocation &al) override {};
bool moveArtifact(const ArtifactLocation &al1, const ArtifactLocation &al2) override {return false;}; bool moveArtifact(const ArtifactLocation &al1, const ArtifactLocation &al2) override {return false;};
void synchronizeArtifactHandlerLists() override {}; void synchronizeArtifactHandlerLists() override {};
@@ -207,7 +207,7 @@ public:
void showCompInfo(ShowInInfobox * comp) override {}; void showCompInfo(ShowInInfobox * comp) override {};
void heroVisitCastle(const CGTownInstance * obj, const CGHeroInstance * hero) override {}; void heroVisitCastle(const CGTownInstance * obj, const CGHeroInstance * hero) override {};
void stopHeroVisitCastle(const CGTownInstance * obj, const CGHeroInstance * hero) override {}; void stopHeroVisitCastle(const CGTownInstance * obj, const CGHeroInstance * hero) override {};
//void giveHeroArtifact(int artid, int hid, int position){}; //void giveHeroArtifact(int artid, int hid, int position){};
//void giveNewArtifact(int hid, int position){}; //void giveNewArtifact(int hid, int position){};
void startBattlePrimary(const CArmedInstance *army1, const CArmedInstance *army2, int3 tile, const CGHeroInstance *hero1, const CGHeroInstance *hero2, bool creatureBank = false, const CGTownInstance *town = nullptr) override {}; //use hero=nullptr for no hero void startBattlePrimary(const CArmedInstance *army1, const CArmedInstance *army2, int3 tile, const CGHeroInstance *hero1, const CGHeroInstance *hero2, bool creatureBank = false, const CGTownInstance *town = nullptr) override {}; //use hero=nullptr for no hero
void startBattleI(const CArmedInstance *army1, const CArmedInstance *army2, int3 tile, bool creatureBank = false) override {}; //if any of armies is hero, hero will be used void startBattleI(const CArmedInstance *army1, const CArmedInstance *army2, int3 tile, bool creatureBank = false) override {}; //if any of armies is hero, hero will be used
@@ -241,7 +241,7 @@ public:
void serialize(COSer &h, const int version); void serialize(COSer &h, const int version);
void serialize(CISer &h, const int version); void serialize(CISer &h, const int version);
void serialize(COSer &h, const int version, const std::set<PlayerColor>& playerIDs); void serialize(COSer &h, const int version, const std::set<PlayerColor>& playerIDs);
void serialize(CISer &h, const int version, const std::set<PlayerColor>& playerIDs); void serialize(CISer &h, const int version, const std::set<PlayerColor>& playerIDs);
void battleFinished(); void battleFinished();

View File

@@ -17,7 +17,7 @@ class CCreatureAnim;
class CComponent; class CComponent;
class CGGarrison; class CGGarrison;
class CSelectableComponent; class CSelectableComponent;
class InfoAboutArmy; struct InfoAboutArmy;
class CArmedInstance; class CArmedInstance;
class IBonusBearer; class IBonusBearer;
class CAnimImage; class CAnimImage;

View File

@@ -50,7 +50,7 @@ struct StackLocation;
class CStackInstance; class CStackInstance;
class CCommanderInstance; class CCommanderInstance;
class CStack; class CStack;
class CPathsInfo; struct CPathsInfo;
class CCreature; class CCreature;
class CLoadFile; class CLoadFile;
class CSaveFile; class CSaveFile;
@@ -98,7 +98,7 @@ public:
virtual void showGarrisonDialog(const CArmedInstance *up, const CGHeroInstance *down, bool removableUnits, QueryID queryID) = 0; virtual void showGarrisonDialog(const CArmedInstance *up, const CGHeroInstance *down, bool removableUnits, QueryID queryID) = 0;
virtual void showTeleportDialog(TeleportChannelID channel, TTeleportExitsList exits, bool impassable, QueryID askID) = 0; virtual void showTeleportDialog(TeleportChannelID channel, TTeleportExitsList exits, bool impassable, QueryID askID) = 0;
virtual void finish(){}; //if for some reason we want to end virtual void finish(){}; //if for some reason we want to end
virtual void showWorldViewEx(const std::vector<ObjectPosInfo> & objectPositions){}; virtual void showWorldViewEx(const std::vector<ObjectPosInfo> & objectPositions){};
}; };

View File

@@ -42,7 +42,7 @@ struct StackLocation;
struct ArtSlotInfo; struct ArtSlotInfo;
struct QuestInfo; struct QuestInfo;
class CMapInfo; class CMapInfo;
class StartInfo; struct StartInfo;
struct CPackForClient : public CPack struct CPackForClient : public CPack
@@ -149,7 +149,7 @@ struct PlayerBlocked : public CPackForClient //96
enum EReason { UPCOMING_BATTLE, ONGOING_MOVEMENT }; enum EReason { UPCOMING_BATTLE, ONGOING_MOVEMENT };
enum EMode { BLOCKADE_STARTED, BLOCKADE_ENDED }; enum EMode { BLOCKADE_STARTED, BLOCKADE_ENDED };
EReason reason; EReason reason;
EMode startOrEnd; EMode startOrEnd;
PlayerColor player; PlayerColor player;
@@ -1020,7 +1020,7 @@ namespace ObjProperty
{ {
enum {OWNER = 1, BLOCKVIS = 2, PRIMARY_STACK_COUNT = 3, VISITORS = 4, VISITED = 5, ID = 6, AVAILABLE_CREATURE = 7, SUBID = 8, enum {OWNER = 1, BLOCKVIS = 2, PRIMARY_STACK_COUNT = 3, VISITORS = 4, VISITED = 5, ID = 6, AVAILABLE_CREATURE = 7, SUBID = 8,
MONSTER_COUNT = 10, MONSTER_POWER = 11, MONSTER_EXP = 12, MONSTER_RESTORE_TYPE = 13, MONSTER_REFUSED_JOIN, MONSTER_COUNT = 10, MONSTER_POWER = 11, MONSTER_EXP = 12, MONSTER_RESTORE_TYPE = 13, MONSTER_REFUSED_JOIN,
//town-specific //town-specific
STRUCTURE_ADD_VISITING_HERO, STRUCTURE_CLEAR_VISITORS, STRUCTURE_ADD_GARRISONED_HERO, //changing buildings state STRUCTURE_ADD_VISITING_HERO, STRUCTURE_CLEAR_VISITORS, STRUCTURE_ADD_GARRISONED_HERO, //changing buildings state
BONUS_VALUE_FIRST, BONUS_VALUE_SECOND, //used in Rampart for special building that generates resources (storing resource type and quantity) BONUS_VALUE_FIRST, BONUS_VALUE_SECOND, //used in Rampart for special building that generates resources (storing resource type and quantity)
@@ -1409,8 +1409,8 @@ struct BattleAttack : public CPackForClient//3006
ui32 stackAttacking; ui32 stackAttacking;
ui32 flags; //uses Eflags (below) ui32 flags; //uses Eflags (below)
enum EFlags{SHOT = 1, COUNTER = 2, LUCKY = 4, UNLUCKY = 8, BALLISTA_DOUBLE_DMG = 16, DEATH_BLOW = 32, SPELL_LIKE = 64}; enum EFlags{SHOT = 1, COUNTER = 2, LUCKY = 4, UNLUCKY = 8, BALLISTA_DOUBLE_DMG = 16, DEATH_BLOW = 32, SPELL_LIKE = 64};
SpellID spellID; //for SPELL_LIKE SpellID spellID; //for SPELL_LIKE
bool shot() const//distance attack - decrease number of shots bool shot() const//distance attack - decrease number of shots
{ {
@@ -1480,12 +1480,12 @@ struct BattleSpellCast : public CPackForClient//3009
struct CustomEffect struct CustomEffect
{ {
/// WoG AC format /// WoG AC format
ui32 effect; ui32 effect;
ui32 stack; ui32 stack;
template <typename Handler> void serialize(Handler &h, const int version) template <typename Handler> void serialize(Handler &h, const int version)
{ {
h & effect & stack; h & effect & stack;
} }
}; };
BattleSpellCast(){type = 3009; casterStack = -1;}; BattleSpellCast(){type = 3009; casterStack = -1;};
@@ -1625,9 +1625,9 @@ struct BattleStackAdded : public CPackForClient //3017
int amount; int amount;
int pos; int pos;
int summoned; //if true, remove it afterwards int summoned; //if true, remove it afterwards
///Actual stack ID, set on apply, do not serialize ///Actual stack ID, set on apply, do not serialize
int newStackID; int newStackID;
template <typename Handler> void serialize(Handler &h, const int version) template <typename Handler> void serialize(Handler &h, const int version)
{ {
@@ -1735,17 +1735,17 @@ struct AdvmapSpellCast : public CPackForClient //108
struct ShowWorldViewEx : public CPackForClient //4000 struct ShowWorldViewEx : public CPackForClient //4000
{ {
PlayerColor player; PlayerColor player;
std::vector<ObjectPosInfo> objectPositions; std::vector<ObjectPosInfo> objectPositions;
ShowWorldViewEx(){type = 4000;} ShowWorldViewEx(){type = 4000;}
void applyCl(CClient *cl); void applyCl(CClient *cl);
template <typename Handler> void serialize(Handler &h, const int version) template <typename Handler> void serialize(Handler &h, const int version)
{ {
h & player & objectPositions; h & player & objectPositions;
} }
}; };
/***********************************************************************************************************/ /***********************************************************************************************************/
@@ -2231,7 +2231,7 @@ struct ELF_VISIBILITY UpdateStartOptions : public CPregamePackToPropagate
struct PregameGuiAction : public CPregamePackToPropagate struct PregameGuiAction : public CPregamePackToPropagate
{ {
enum {NO_TAB, OPEN_OPTIONS, OPEN_SCENARIO_LIST, OPEN_RANDOM_MAP_OPTIONS} enum {NO_TAB, OPEN_OPTIONS, OPEN_SCENARIO_LIST, OPEN_RANDOM_MAP_OPTIONS}
action; action;
void apply(CSelectionScreen *selScreen); //that functions are implemented in CPreGame.cpp void apply(CSelectionScreen *selScreen); //that functions are implemented in CPreGame.cpp

View File

@@ -12,9 +12,7 @@
#include "ISpellMechanics.h" #include "ISpellMechanics.h"
class ISpellMechanics; struct StacksInjured;
class BattleSpellCast;
class StacksInjured;
struct SpellCastContext struct SpellCastContext
{ {

View File

@@ -24,7 +24,7 @@ class CLegacyConfigParser;
class CGHeroInstance; class CGHeroInstance;
class CStack; class CStack;
class CBattleInfoCallback; class CBattleInfoCallback;
class BattleInfo; struct BattleInfo;
struct CPackForClient; struct CPackForClient;
struct BattleSpellCast; struct BattleSpellCast;
class CGameInfoCallback; class CGameInfoCallback;