Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

185 lines (161 sloc) 5.243 kB
// illarionserver - server for the game Illarion
// Copyright 2011 Illarion e.V.
//
// This file is part of illarionserver.
//
// illarionserver is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// illarionserver is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with illarionserver. If not, see <http://www.gnu.org/licenses/>.
#ifndef _TABLESTRUCTS_HPP_
#define _TABLESTRUCTS_HPP_
#define BOOST_HAS_THREADS
#include <string>
#include "types.hpp"
#include <boost/shared_ptr.hpp>
#include <pthread.h>
#include <iostream>
class LuaTileScript;
class LuaItemScript;
class LuaWeaponScript;
class LuaLongTimeEffectScript;
struct CommonStruct {
TYPE_OF_ITEM_ID id;
TYPE_OF_WEIGHT Weight;
TYPE_OF_AGINGSPEED AgingSpeed;
TYPE_OF_ITEM_ID ObjectAfterRot;
TYPE_OF_ITEM_ID AfterInfiniteRot;
TYPE_OF_BRIGHTNESS Brightness;
TYPE_OF_WORTH Worth;
bool rotsInInventory;
bool isStackable;
CommonStruct() {
id = 0;
Weight = 0;
AgingSpeed = 0;
ObjectAfterRot = 0;
AfterInfiniteRot = 0;
Brightness = 0;
Worth = 0;
rotsInInventory = false;
isStackable = false;
}
CommonStruct(const CommonStruct &source) {
id = source.id;
Weight = source.Weight;
AgingSpeed = source.AgingSpeed;
ObjectAfterRot = source.ObjectAfterRot;
AfterInfiniteRot = source.AfterInfiniteRot;
Brightness = source.Brightness;
Worth = source.Worth;
rotsInInventory = source.rotsInInventory;
isStackable = source.isStackable;
}
CommonStruct &operator=(const CommonStruct &source) {
if (this != &source) {
//( ( CommonStruct ) * this ) = ( ( CommonStruct ) source );
id = source.id;
Weight = source.Weight;
AgingSpeed = source.AgingSpeed;
ObjectAfterRot = source.ObjectAfterRot;
AfterInfiniteRot = source.AfterInfiniteRot;
Brightness = source.Brightness;
Worth = source.Worth;
rotsInInventory = source.rotsInInventory;
isStackable = source.isStackable;
}
return *this;
}
};
struct TilesModificatorStruct {
unsigned char Modificator;
};
struct LongTimeEffectStruct {
uint16_t effectid;
std::string effectname;
std::string scriptname;
boost::shared_ptr<LuaLongTimeEffectScript> script;
LongTimeEffectStruct() {
effectid = 0;
effectname = "";
scriptname = "";
}
};
struct NamesStruct {
TYPE_OF_GERMAN German;
TYPE_OF_ENGLISH English;
TYPE_OF_FRENCH French;
};
struct WeaponStruct {
TYPE_OF_ATTACK Attack;
TYPE_OF_DEFENCE Defence;
TYPE_OF_ACCURACY Accuracy;
TYPE_OF_RANGE Range;
TYPE_OF_WEAPONTYPE WeaponType;
TYPE_OF_AMMUNITIONTYPE AmmunitionType;
TYPE_OF_ACTIONPOINTS ActionPoints;
TYPE_OF_MAGICDISTURBANCE MagicDisturbance;
TYPE_OF_POISONSTRENGTH PoisonStrength;
boost::shared_ptr<LuaWeaponScript> script;
//Constructor
WeaponStruct() : Attack(0) , Defence(0) , Accuracy(0) , Range(0) , WeaponType(0) , AmmunitionType(0) , ActionPoints(0) , MagicDisturbance(0) , PoisonStrength(0) {}
};
struct ArmorStruct {
TYPE_OF_BODYPARTS BodyParts;
TYPE_OF_PUNCTUREARMOR PunctureArmor;
TYPE_OF_STROKEARMOR StrokeArmor;
TYPE_OF_THRUSTARMOR ThrustArmor;
TYPE_OF_MAGICDISTURBANCE MagicDisturbance;
int16_t Absorb;
int16_t Stiffness;
ArmorStruct() : BodyParts(0) , PunctureArmor(0), StrokeArmor(0), ThrustArmor(0),MagicDisturbance(0),Absorb(0), Stiffness(0) {}
};
struct TilesStruct {
unsigned char flags;
TYPE_OF_WALKINGCOST walkingCost;
TYPE_OF_GERMAN German;
TYPE_OF_ENGLISH English;
TYPE_OF_FRENCH French;
boost::shared_ptr<LuaTileScript> script;
};
struct PlayerraceStruct {
std::string racename;
short int points;
short int minage;
short int maxage;
short int minweight;
short int maxweight;
unsigned char minbodyheight;
unsigned char maxbodyheight;
unsigned char minagility;
unsigned char maxagility;
unsigned char minconstitution;
unsigned char maxconstitution;
unsigned char mindexterity;
unsigned char maxdexterity;
unsigned char minessence;
unsigned char maxessence;
unsigned char minintelligence;
unsigned char maxintelligence;
unsigned char minperception;
unsigned char maxperception;
unsigned char minstrength;
unsigned char maxstrength;
unsigned char minwillpower;
unsigned char maxwillpower;
};
struct MonsterArmor {
short int strokeArmor;
short int punctureArmor;
short int thrustArmor;
MonsterArmor() : strokeArmor(0), punctureArmor(0), thrustArmor(0) {}
};
#endif // TABLESTRUCTS_HPP
Jump to Line
Something went wrong with that request. Please try again.