mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
There no point for struct MetaString and struct Component to have CPack as base
This commit is contained in:
parent
6d13c8938c
commit
ebb88f4133
@ -19,12 +19,9 @@ class CArtifactSet;
|
||||
class CBonusSystemNode;
|
||||
struct ArtSlotInfo;
|
||||
|
||||
|
||||
|
||||
#include "ConstTransitivePtr.h"
|
||||
#include "GameConstants.h"
|
||||
|
||||
|
||||
struct DLL_LINKAGE CPack
|
||||
{
|
||||
ui16 type;
|
||||
@ -43,8 +40,7 @@ struct DLL_LINKAGE CPack
|
||||
|
||||
std::ostream & operator<<(std::ostream & out, const CPack * pack);
|
||||
|
||||
|
||||
struct DLL_LINKAGE MetaString : public CPack //2001 helper for object scrips
|
||||
struct DLL_LINKAGE MetaString
|
||||
{
|
||||
private:
|
||||
enum EMessage {TEXACT_STRING, TLOCAL_STRING, TNUMBER, TREPLACE_ESTRING, TREPLACE_LSTRING, TREPLACE_NUMBER, TREPLACE_PLUSNUMBER};
|
||||
@ -116,16 +112,13 @@ public:
|
||||
numbers.clear();
|
||||
}
|
||||
void toString(std::string &dst) const;
|
||||
std::string toString() const override;
|
||||
std::string toString() const;
|
||||
void getLocalString(const std::pair<ui8,ui32> &txt, std::string &dst) const;
|
||||
|
||||
MetaString()
|
||||
{
|
||||
type = 2001;
|
||||
}
|
||||
MetaString(){}
|
||||
};
|
||||
|
||||
struct Component : public CPack //2002 helper for object scrips informations
|
||||
struct Component
|
||||
{
|
||||
enum EComponentType {PRIM_SKILL, SEC_SKILL, RESOURCE, CREATURE, ARTIFACT, EXPERIENCE, SPELL, MORALE, LUCK, BUILDING, HERO_PORTRAIT, FLAG};
|
||||
ui16 id, subtype; //id uses ^^^ enums, when id==EXPPERIENCE subtype==0 means exp points and subtype==1 levels)
|
||||
@ -138,13 +131,11 @@ struct Component : public CPack //2002 helper for object scrips informations
|
||||
}
|
||||
Component()
|
||||
{
|
||||
type = 2002;
|
||||
}
|
||||
DLL_LINKAGE explicit Component(const CStackBasicDescriptor &stack);
|
||||
Component(Component::EComponentType Type, ui16 Subtype, si32 Val, si16 When)
|
||||
:id(Type),subtype(Subtype),val(Val),when(When)
|
||||
{
|
||||
type = 2002;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1838,5 +1838,4 @@ DLL_LINKAGE void YourTurn::applyGs(CGameState *gs)
|
||||
DLL_LINKAGE Component::Component(const CStackBasicDescriptor &stack)
|
||||
: id(CREATURE), subtype(stack.type->idNumber), val(stack.count), when(0)
|
||||
{
|
||||
type = 2002;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user