2011-08-28 19:49:15 +02:00
|
|
|
/*
|
2012-01-02 17:58:37 +01:00
|
|
|
* Copyright (c) 2010-2012 OTClient <https://github.com/edubart/otclient>
|
2011-08-28 19:49:15 +02:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OTCLIENT_CONST_H
|
|
|
|
#define OTCLIENT_CONST_H
|
|
|
|
|
|
|
|
namespace Otc
|
|
|
|
{
|
2012-02-20 03:27:08 +01:00
|
|
|
constexpr const char* AppName = "OTClient";
|
|
|
|
constexpr const char* AppCompactName = "otclient";
|
2012-03-22 13:57:43 +01:00
|
|
|
constexpr const char* AppVersion = "0.4.0_dev";
|
2011-08-28 20:26:57 +02:00
|
|
|
|
2012-01-30 01:00:12 +01:00
|
|
|
enum {
|
|
|
|
TILE_PIXELS = 32,
|
2012-01-30 19:18:10 +01:00
|
|
|
MAX_ELEVATION = 24,
|
|
|
|
|
|
|
|
SEA_FLOOR = 7,
|
2012-01-30 01:00:12 +01:00
|
|
|
MAX_Z = 15,
|
2012-01-30 19:18:10 +01:00
|
|
|
UNDERGROUND_FLOOR = SEA_FLOOR+1,
|
2012-01-30 01:00:12 +01:00
|
|
|
VISIBLE_X_TILES = 15,
|
|
|
|
VISIBLE_Y_TILES = 11,
|
2012-01-30 19:18:10 +01:00
|
|
|
AWARE_UNDEGROUND_FLOOR_RANGE = 2,
|
|
|
|
AWARE_X_TILES = VISIBLE_X_TILES + 3,
|
|
|
|
AWARE_Y_TILES = VISIBLE_Y_TILES + 3,
|
|
|
|
AWARE_X_LEFT_TILES = AWARE_X_TILES/2 - 1,
|
|
|
|
AWARE_X_RIGHT_TILES = AWARE_X_TILES/2,
|
|
|
|
AWARE_Y_TOP_TILES = AWARE_Y_TILES/2 - 1,
|
|
|
|
AWARE_Y_BOTTOM_TILES = AWARE_Y_TILES/2,
|
|
|
|
|
2012-01-30 01:00:12 +01:00
|
|
|
EFFECT_TICKS_PER_FRAME = 75,
|
2012-02-02 17:37:52 +01:00
|
|
|
INVISIBLE_TICKS_PER_FRAME = 500,
|
2012-01-30 01:00:12 +01:00
|
|
|
ITEM_TICKS_PER_FRAME = 500,
|
|
|
|
ANIMATED_TEXT_DURATION = 1000,
|
|
|
|
STATIC_DURATION_PER_CHARACTER = 75,
|
|
|
|
MIN_STATIC_TEXT_DURATION = 3000,
|
|
|
|
MAX_STATIC_TEXT_WIDTH = 200,
|
|
|
|
};
|
|
|
|
|
2012-01-30 19:18:10 +01:00
|
|
|
enum DrawFlags {
|
|
|
|
DrawGround = 1,
|
2012-02-02 21:54:49 +01:00
|
|
|
DrawGroundBorders = 2,
|
|
|
|
DrawOnBottom = 4,
|
|
|
|
DrawOnTop = 8,
|
|
|
|
DrawItems = 16,
|
|
|
|
DrawCreatures = 32,
|
|
|
|
DrawEffects = 64,
|
|
|
|
DrawMissiles = 128,
|
|
|
|
DrawCreaturesInformation = 256,
|
|
|
|
DrawStaticTexts = 512,
|
|
|
|
DrawAnimatedTexts = 1024,
|
|
|
|
DrawAnimations = 2048,
|
|
|
|
DrawWalls = DrawOnBottom | DrawOnTop,
|
|
|
|
DrawEverything = DrawGround | DrawGroundBorders | DrawWalls | DrawItems |
|
2012-01-30 19:18:10 +01:00
|
|
|
DrawCreatures | DrawEffects | DrawMissiles |
|
2012-02-02 17:37:52 +01:00
|
|
|
DrawCreaturesInformation | DrawStaticTexts | DrawAnimatedTexts | DrawAnimations
|
2012-01-30 01:00:12 +01:00
|
|
|
};
|
|
|
|
|
2011-08-31 18:49:51 +02:00
|
|
|
enum DatOpts {
|
2011-08-31 15:16:56 +02:00
|
|
|
DatGround = 0,
|
2011-09-01 02:44:33 +02:00
|
|
|
DatGroundClip,
|
|
|
|
DatOnBottom,
|
|
|
|
DatOnTop,
|
|
|
|
DatContainer,
|
|
|
|
DatStackable,
|
|
|
|
DatForceUse,
|
|
|
|
DatMultiUse,
|
|
|
|
DatWritable,
|
|
|
|
DatWritableOnce,
|
|
|
|
DatFluidContainer,
|
|
|
|
DatSplash,
|
|
|
|
DatBlockWalk,
|
|
|
|
DatNotMovable,
|
|
|
|
DatBlockProjectile,
|
|
|
|
DatBlockPathFind,
|
|
|
|
DatPickupable,
|
|
|
|
DatHangable,
|
|
|
|
DatHookSouth,
|
|
|
|
DatHookEast,
|
|
|
|
DatRotable,
|
|
|
|
DatLight,
|
|
|
|
DatDontHide,
|
|
|
|
DatTranslucent,
|
2011-09-01 19:55:50 +02:00
|
|
|
DatDisplacement,
|
2011-09-01 02:44:33 +02:00
|
|
|
DatElevation,
|
|
|
|
DatLyingCorpse,
|
|
|
|
DatAnimateAlways,
|
|
|
|
DatMinimapColor,
|
|
|
|
DatLensHelp,
|
|
|
|
DatFullGround,
|
|
|
|
DatIgnoreLook,
|
|
|
|
DatCloth,
|
|
|
|
DatAnimation, // lastest tibia
|
2011-08-31 18:49:51 +02:00
|
|
|
DatLastOpt = 255
|
|
|
|
};
|
|
|
|
|
2011-11-10 06:29:25 +01:00
|
|
|
enum InventorySlots {
|
|
|
|
InventorySlotHead = 1,
|
|
|
|
InventorySlotNecklace,
|
|
|
|
InventorySlotBackpack,
|
|
|
|
InventorySlotArmor,
|
|
|
|
InventorySlotRight,
|
|
|
|
InventorySlotLeft,
|
|
|
|
InventorySlotLegs,
|
|
|
|
InventorySlotFeet,
|
|
|
|
InventorySlotRing,
|
|
|
|
InventorySlotAmmo
|
|
|
|
};
|
|
|
|
|
2011-11-03 20:26:53 +01:00
|
|
|
enum Statistic {
|
2012-01-09 01:43:36 +01:00
|
|
|
Health = 0,
|
2011-11-03 20:26:53 +01:00
|
|
|
MaxHealth,
|
|
|
|
FreeCapacity,
|
|
|
|
Experience,
|
|
|
|
Level,
|
|
|
|
LevelPercent,
|
|
|
|
Mana,
|
|
|
|
MaxMana,
|
|
|
|
MagicLevel,
|
|
|
|
MagicLevelPercent,
|
|
|
|
Soul,
|
|
|
|
Stamina,
|
|
|
|
LastStatistic
|
|
|
|
};
|
|
|
|
|
2011-08-30 03:34:00 +02:00
|
|
|
enum Skill {
|
|
|
|
Fist = 0,
|
|
|
|
Club,
|
|
|
|
Sword,
|
|
|
|
Axe,
|
|
|
|
Distance,
|
|
|
|
Shielding,
|
|
|
|
Fishing,
|
|
|
|
LastSkill
|
|
|
|
};
|
|
|
|
|
2012-04-27 08:30:54 +02:00
|
|
|
enum Inventory {
|
|
|
|
NoInventory = 0,
|
|
|
|
Head,
|
|
|
|
Neck,
|
|
|
|
Bag,
|
|
|
|
Armor,
|
|
|
|
RightHand,
|
|
|
|
LeftHand,
|
|
|
|
Legs,
|
|
|
|
Feet,
|
|
|
|
Ring,
|
|
|
|
Ammo,
|
|
|
|
LastInventory
|
|
|
|
};
|
|
|
|
|
2011-08-28 19:49:15 +02:00
|
|
|
enum Direction {
|
|
|
|
North = 0,
|
|
|
|
East,
|
|
|
|
South,
|
2011-08-29 07:54:28 +02:00
|
|
|
West,
|
|
|
|
NorthEast,
|
|
|
|
SouthEast,
|
|
|
|
SouthWest,
|
2011-12-26 07:14:57 +01:00
|
|
|
NorthWest,
|
|
|
|
InvalidDirection
|
2011-08-28 19:49:15 +02:00
|
|
|
};
|
|
|
|
|
2011-11-30 19:59:36 +01:00
|
|
|
enum FluidsColor {
|
2012-01-09 01:43:36 +01:00
|
|
|
FluidTransparent = 0,
|
2011-11-30 19:59:36 +01:00
|
|
|
FluidBlue,
|
|
|
|
FluidRed,
|
|
|
|
FluidBrown,
|
|
|
|
FluidGreen,
|
|
|
|
FluidYellow,
|
|
|
|
FluidWhite,
|
|
|
|
FluidPurple
|
|
|
|
};
|
|
|
|
|
|
|
|
enum FluidsType {
|
2012-01-25 01:00:09 +01:00
|
|
|
FluidNone = 0,
|
|
|
|
FluidWater,
|
|
|
|
FluidMana,
|
|
|
|
FluidBeer,
|
|
|
|
FluidOil,
|
|
|
|
FluidBlood,
|
|
|
|
FluidSlime,
|
|
|
|
FluidMud,
|
|
|
|
FluidLemonade,
|
|
|
|
FluidMilk,
|
|
|
|
FluidWine,
|
|
|
|
FluidHealth,
|
|
|
|
FluidUrine,
|
|
|
|
FluidRum,
|
|
|
|
FluidFruidJuice,
|
|
|
|
FluidCoconutMilk,
|
|
|
|
FluidTea,
|
|
|
|
FluidMead
|
2011-11-30 19:59:36 +01:00
|
|
|
};
|
|
|
|
|
2012-01-03 14:13:54 +01:00
|
|
|
enum FightModes {
|
|
|
|
FightOffensive = 1,
|
|
|
|
FightBalanced = 2,
|
|
|
|
FightDefensive = 3
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ChaseModes {
|
2012-02-08 00:06:52 +01:00
|
|
|
DontChase = 0,
|
2012-01-03 14:13:54 +01:00
|
|
|
ChaseOpponent = 1
|
|
|
|
};
|
2012-01-07 00:54:17 +01:00
|
|
|
|
|
|
|
enum PlayerSkulls {
|
|
|
|
SkullNone = 0,
|
2012-01-09 01:43:36 +01:00
|
|
|
SkullYellow,
|
|
|
|
SkullGreen,
|
|
|
|
SkullWhite,
|
|
|
|
SkullRed,
|
|
|
|
SkullBlack,
|
|
|
|
SkullOrange
|
2012-01-07 00:54:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum PlayerShields {
|
|
|
|
ShieldNone = 0,
|
2012-01-11 00:38:32 +01:00
|
|
|
ShieldWhiteYellow, // 1 party leader
|
|
|
|
ShieldWhiteBlue, // 2 party member
|
|
|
|
ShieldBlue, // 3 party member sexp off
|
|
|
|
ShieldYellow, // 4 party leader sexp off
|
|
|
|
ShieldBlueSharedExp, // 5 party member sexp on
|
|
|
|
ShieldYellowSharedExp, // 6 // party leader sexp on
|
|
|
|
ShieldBlueNoSharedExpBlink, // 7 party member sexp inactive guilty
|
|
|
|
ShieldYellowNoSharedExpBlink, // 8 // party leader sexp inactive guilty
|
|
|
|
ShieldBlueNoSharedExp, // 9 party member sexp inactive innocent
|
|
|
|
ShieldYellowNoSharedExp // 10 party leader sexp inactive innocent
|
2012-01-07 00:54:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum PlayerEmblems {
|
|
|
|
EmblemNone = 0,
|
2012-01-09 01:43:36 +01:00
|
|
|
EmblemGreen,
|
|
|
|
EmblemRed,
|
|
|
|
EmblemBlue
|
|
|
|
};
|
|
|
|
|
2012-02-09 04:45:19 +01:00
|
|
|
enum PlayerStates {
|
2012-01-09 01:43:36 +01:00
|
|
|
IconNone = 0,
|
|
|
|
IconPoison = 1,
|
|
|
|
IconBurn = 2,
|
|
|
|
IconEnergy = 4,
|
|
|
|
IconDrunk = 8,
|
|
|
|
IconManaShield = 16,
|
|
|
|
IconParalyze = 32,
|
|
|
|
IconHaste = 64,
|
|
|
|
IconSwords = 128,
|
|
|
|
IconDrowning = 256,
|
|
|
|
IconFreezing = 512,
|
|
|
|
IconDazzled = 1024,
|
|
|
|
IconCursed = 2048,
|
|
|
|
IconPartyBuff = 4096,
|
|
|
|
IconPzBlock = 8192,
|
|
|
|
IconPz = 16384
|
2012-01-07 00:54:17 +01:00
|
|
|
};
|
2012-02-03 01:25:18 +01:00
|
|
|
|
|
|
|
enum SpeakType {
|
|
|
|
SpeakSay = 1,
|
|
|
|
SpeakWhisper,
|
|
|
|
SpeakYell,
|
|
|
|
SpeakBroadcast,
|
|
|
|
SpeakPrivate,
|
|
|
|
SpeakPrivateRed,
|
|
|
|
SpeakPrivatePlayerToNpc,
|
|
|
|
SpeakPrivateNpcToPlayer,
|
|
|
|
SpeakChannelYellow,
|
|
|
|
SpeakChannelWhite,
|
|
|
|
SpeakChannelRed,
|
|
|
|
SpeakChannelOrange,
|
|
|
|
SpeakMonsterSay,
|
|
|
|
SpeakMonsterYell
|
|
|
|
};
|
2012-05-29 00:04:44 +02:00
|
|
|
|
|
|
|
enum GameFeature {
|
|
|
|
GameExtendedOpcode = 0,
|
|
|
|
GameProtocolChecksum,
|
|
|
|
GameAccountNames,
|
|
|
|
GameChallangeOnLogin,
|
|
|
|
GameStackposOnTileAddThing,
|
|
|
|
GamePenalityOnDeath,
|
|
|
|
GameNameOnNpcTrade,
|
|
|
|
GameDoubleFreeCapacity,
|
|
|
|
GameDoubleExperience,
|
|
|
|
GameTotalCapacity,
|
|
|
|
GameSkillsBase,
|
|
|
|
GameAdditionalPlayerStats,
|
|
|
|
GameIdOnCancelAttack,
|
|
|
|
GameChannelPlayerList,
|
|
|
|
GamePlayerMounts,
|
|
|
|
GameEnvironmentEffect,
|
|
|
|
GameCreatureType,
|
|
|
|
GameCreatureAdditionalInfo,
|
|
|
|
GameCreaturePassableInfo,
|
|
|
|
GameItemAnimationPhase,
|
|
|
|
GameTrucatedPingOpcode,
|
|
|
|
GameReverseCreatureStack,
|
|
|
|
LastGameFeature
|
|
|
|
};
|
2011-08-28 19:49:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|