Activation of the new 'Bots' command system

This commit is contained in:
Uleat
2016-03-24 18:50:31 -04:00
parent 747895cbe5
commit b327da7092
48 changed files with 12821 additions and 5616 deletions
+571 -270
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,275 +18,576 @@
#include "../common/global_define.h"
#include "../common/classes.h"
const char* GetEQClassName(uint8 class_, uint8 level) {
switch(class_) {
case WARRIOR:
if (level >= 70)
return "Vanquisher";
else if (level >= 65)
return "Overlord"; //Baron-Sprite: LEAVE MY CLASSES ALONE.
else if (level >= 60)
return "Warlord";
else if (level >= 55)
return "Myrmidon";
else if (level >= 51)
return "Champion";
else
return "Warrior";
case CLERIC:
if (level >= 70)
return "Prelate";
else if (level >= 65)
return "Archon";
else if (level >= 60)
return "High Priest";
else if (level >= 55)
return "Templar";
else if (level >= 51)
return "Vicar";
else
return "Cleric";
case PALADIN:
if (level >= 70)
return "Lord";
else if (level >= 65)
return "Lord Protector";
else if (level >= 60)
return "Crusader";
else if (level >= 55)
return "Knight";
else if (level >= 51)
return "Cavalier";
else
return "Paladin";
case RANGER:
if (level >= 70)
return "Plainswalker";
else if (level >= 65)
return "Forest Stalker";
else if (level >= 60)
return "Warder";
else if (level >= 55)
return "Outrider";
else if (level >= 51)
return "Pathfinder";
else
return "Ranger";
case SHADOWKNIGHT:
if (level >= 70)
return "Scourge Knight";
else if (level >= 65)
return "Dread Lord";
else if (level >= 60)
return "Grave Lord";
else if (level >= 55)
return "Revenant";
else if (level >= 51)
return "Reaver";
else
return "Shadowknight";
case DRUID:
if (level >= 70)
return "Natureguard";
else if (level >= 65)
return "Storm Warden";
else if (level >= 60)
return "Hierophant";
else if (level >= 55)
return "Preserver";
else if (level >= 51)
return "Wanderer";
else
return "Druid";
case MONK:
if (level >= 70)
return "Stone Fist";
else if (level >= 65)
return "Transcendent";
else if (level >= 60)
return "Grandmaster";
else if (level >= 55)
return "Master";
else if (level >= 51)
return "Disciple";
else
return "Monk";
case BARD:
if (level >= 70)
return "Performer";
else if (level >= 65)
return "Maestro";
else if (level >= 60)
return "Virtuoso";
else if (level >= 55)
return "Troubadour";
else if (level >= 51)
return "Minstrel";
else
return "Bard";
case ROGUE:
if (level >= 70)
return "Nemesis";
else if (level >= 65)
return "Deceiver";
else if (level >= 60)
return "Assassin";
else if (level >= 55)
return "Blackguard";
else if (level >= 51)
return "Rake";
else
return "Rogue";
case SHAMAN:
if (level >= 70)
return "Soothsayer";
else if (level >= 65)
return "Prophet";
else if (level >= 60)
return "Oracle";
else if (level >= 55)
return "Luminary";
else if (level >= 51)
return "Mystic";
else
return "Shaman";
case NECROMANCER:
if (level >= 70)
return "Wraith";
else if (level >= 65)
return "Arch Lich";
else if (level >= 60)
return "Warlock";
else if (level >= 55)
return "Defiler";
else if (level >= 51)
return "Heretic";
else
return "Necromancer";
case WIZARD:
if (level >= 70)
return "Grand Arcanist";
else if (level >= 65)
return "Arcanist";
else if (level >= 60)
return "Sorcerer";
else if (level >= 55)
return "Evoker";
else if (level >= 51)
return "Channeler";
else
return "Wizard";
case MAGICIAN:
if (level >= 70)
return "Arch Magus";
else if (level >= 65)
return "Arch Convoker";
else if (level >= 60)
return "Arch Mage";
else if (level >= 55)
return "Conjurer";
if (level >= 51)
return "Elementalist";
else
return "Magician";
case ENCHANTER:
if (level >= 70)
return "Bedazzler";
else if (level >= 65)
return "Coercer";
else if (level >= 60)
return "Phantasmist";
else if (level >= 55)
return "Beguiler";
else if (level >= 51)
return "Illusionist";
else
return "Enchanter";
case BEASTLORD:
if (level >= 70)
return "Wildblood";
else if (level >= 65)
return "Feral Lord";
else if (level >= 60)
return "Savage Lord";
else if (level >= 55)
return "Animist";
else if (level >= 51)
return "Primalist";
else
return "Beastlord";
case BERSERKER:
if (level >= 70)
return "Ravager";
else if (level >= 65)
return "Fury";
else if (level >= 60)
return "Rager";
else if (level >= 55)
return "Vehement";
else if (level >= 51)
return "Brawler";
else
return "Berserker";
case BANKER:
if (level >= 70)
return "Master Banker";
else if (level >= 65)
return "Elder Banker";
else if (level >= 60)
return "Oldest Banker";
else if (level >= 55)
return "Older Banker";
else if (level >= 51)
return "Old Banker";
else
return "Banker";
case WARRIORGM:
return "Warrior Guildmaster";
case CLERICGM:
return "Cleric Guildmaster";
case PALADINGM:
return "Paladin Guildmaster";
case RANGERGM:
return "Ranger Guildmaster";
case SHADOWKNIGHTGM:
return "Shadowknight Guildmaster";
case DRUIDGM:
return "Druid Guildmaster";
case MONKGM:
return "Monk Guildmaster";
case BARDGM:
return "Bard Guildmaster";
case ROGUEGM:
return "Rogue Guildmaster";
case SHAMANGM:
return "Shaman Guildmaster";
case NECROMANCERGM:
return "Necromancer Guildmaster";
case WIZARDGM:
return "Wizard Guildmaster";
case MAGICIANGM:
return "Magician Guildmaster";
case ENCHANTERGM:
return "Enchanter Guildmaster";
case BEASTLORDGM:
return "Beastlord Guildmaster";
case BERSERKERGM:
return "Berserker Guildmaster";
case MERCHANT:
return "Merchant";
case ADVENTURERECRUITER:
return "Adventure Recruiter";
case ADVENTUREMERCHANT:
return "Adventure Merchant";
case CORPSE_CLASS:
return "Corpse Class";
case TRIBUTE_MASTER:
return "Tribute Master";
case GUILD_TRIBUTE_MASTER:
return "Guild Tribute Master";
default:
return "Unknown";
const char* GetClassIDName(uint8 class_id, uint8 level)
{
switch (class_id) {
case WARRIOR:
if (level >= 70)
return "Vanquisher";
else if (level >= 65)
return "Overlord"; //Baron-Sprite: LEAVE MY CLASSES ALONE.
else if (level >= 60)
return "Warlord";
else if (level >= 55)
return "Myrmidon";
else if (level >= 51)
return "Champion";
else
return "Warrior";
case CLERIC:
if (level >= 70)
return "Prelate";
else if (level >= 65)
return "Archon";
else if (level >= 60)
return "High Priest";
else if (level >= 55)
return "Templar";
else if (level >= 51)
return "Vicar";
else
return "Cleric";
case PALADIN:
if (level >= 70)
return "Lord";
else if (level >= 65)
return "Lord Protector";
else if (level >= 60)
return "Crusader";
else if (level >= 55)
return "Knight";
else if (level >= 51)
return "Cavalier";
else
return "Paladin";
case RANGER:
if (level >= 70)
return "Plainswalker";
else if (level >= 65)
return "Forest Stalker";
else if (level >= 60)
return "Warder";
else if (level >= 55)
return "Outrider";
else if (level >= 51)
return "Pathfinder";
else
return "Ranger";
case SHADOWKNIGHT:
if (level >= 70)
return "Scourge Knight";
else if (level >= 65)
return "Dread Lord";
else if (level >= 60)
return "Grave Lord";
else if (level >= 55)
return "Revenant";
else if (level >= 51)
return "Reaver";
else
return "Shadowknight";
case DRUID:
if (level >= 70)
return "Natureguard";
else if (level >= 65)
return "Storm Warden";
else if (level >= 60)
return "Hierophant";
else if (level >= 55)
return "Preserver";
else if (level >= 51)
return "Wanderer";
else
return "Druid";
case MONK:
if (level >= 70)
return "Stone Fist";
else if (level >= 65)
return "Transcendent";
else if (level >= 60)
return "Grandmaster";
else if (level >= 55)
return "Master";
else if (level >= 51)
return "Disciple";
else
return "Monk";
case BARD:
if (level >= 70)
return "Performer";
else if (level >= 65)
return "Maestro";
else if (level >= 60)
return "Virtuoso";
else if (level >= 55)
return "Troubadour";
else if (level >= 51)
return "Minstrel";
else
return "Bard";
case ROGUE:
if (level >= 70)
return "Nemesis";
else if (level >= 65)
return "Deceiver";
else if (level >= 60)
return "Assassin";
else if (level >= 55)
return "Blackguard";
else if (level >= 51)
return "Rake";
else
return "Rogue";
case SHAMAN:
if (level >= 70)
return "Soothsayer";
else if (level >= 65)
return "Prophet";
else if (level >= 60)
return "Oracle";
else if (level >= 55)
return "Luminary";
else if (level >= 51)
return "Mystic";
else
return "Shaman";
case NECROMANCER:
if (level >= 70)
return "Wraith";
else if (level >= 65)
return "Arch Lich";
else if (level >= 60)
return "Warlock";
else if (level >= 55)
return "Defiler";
else if (level >= 51)
return "Heretic";
else
return "Necromancer";
case WIZARD:
if (level >= 70)
return "Grand Arcanist";
else if (level >= 65)
return "Arcanist";
else if (level >= 60)
return "Sorcerer";
else if (level >= 55)
return "Evoker";
else if (level >= 51)
return "Channeler";
else
return "Wizard";
case MAGICIAN:
if (level >= 70)
return "Arch Magus";
else if (level >= 65)
return "Arch Convoker";
else if (level >= 60)
return "Arch Mage";
else if (level >= 55)
return "Conjurer";
if (level >= 51)
return "Elementalist";
else
return "Magician";
case ENCHANTER:
if (level >= 70)
return "Bedazzler";
else if (level >= 65)
return "Coercer";
else if (level >= 60)
return "Phantasmist";
else if (level >= 55)
return "Beguiler";
else if (level >= 51)
return "Illusionist";
else
return "Enchanter";
case BEASTLORD:
if (level >= 70)
return "Wildblood";
else if (level >= 65)
return "Feral Lord";
else if (level >= 60)
return "Savage Lord";
else if (level >= 55)
return "Animist";
else if (level >= 51)
return "Primalist";
else
return "Beastlord";
case BERSERKER:
if (level >= 70)
return "Ravager";
else if (level >= 65)
return "Fury";
else if (level >= 60)
return "Rager";
else if (level >= 55)
return "Vehement";
else if (level >= 51)
return "Brawler";
else
return "Berserker";
case BANKER:
if (level >= 70)
return "Master Banker";
else if (level >= 65)
return "Elder Banker";
else if (level >= 60)
return "Oldest Banker";
else if (level >= 55)
return "Older Banker";
else if (level >= 51)
return "Old Banker";
else
return "Banker";
case WARRIORGM:
return "Warrior Guildmaster";
case CLERICGM:
return "Cleric Guildmaster";
case PALADINGM:
return "Paladin Guildmaster";
case RANGERGM:
return "Ranger Guildmaster";
case SHADOWKNIGHTGM:
return "Shadowknight Guildmaster";
case DRUIDGM:
return "Druid Guildmaster";
case MONKGM:
return "Monk Guildmaster";
case BARDGM:
return "Bard Guildmaster";
case ROGUEGM:
return "Rogue Guildmaster";
case SHAMANGM:
return "Shaman Guildmaster";
case NECROMANCERGM:
return "Necromancer Guildmaster";
case WIZARDGM:
return "Wizard Guildmaster";
case MAGICIANGM:
return "Magician Guildmaster";
case ENCHANTERGM:
return "Enchanter Guildmaster";
case BEASTLORDGM:
return "Beastlord Guildmaster";
case BERSERKERGM:
return "Berserker Guildmaster";
case MERCHANT:
return "Merchant";
case ADVENTURERECRUITER:
return "Adventure Recruiter";
case ADVENTUREMERCHANT:
return "Adventure Merchant";
case CORPSE_CLASS:
return "Corpse Class";
case TRIBUTE_MASTER:
return "Tribute Master";
case GUILD_TRIBUTE_MASTER:
return "Guild Tribute Master";
default:
return "Unknown";
}
}
const char* GetPlayerClassName(uint32 player_class_value, uint8 level)
{
return GetClassIDName(GetClassIDFromPlayerClassValue(player_class_value), level);
}
uint32 GetPlayerClassValue(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case CLERIC:
case PALADIN:
case RANGER:
case SHADOWKNIGHT:
case DRUID:
case MONK:
case BARD:
case ROGUE:
case SHAMAN:
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
case BEASTLORD:
case BERSERKER:
return class_id;
default:
return PLAYER_CLASS_UNKNOWN; // watch
}
}
uint32 GetPlayerClassBit(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
return PLAYER_CLASS_WARRIOR_BIT;
case CLERIC:
return PLAYER_CLASS_CLERIC_BIT;
case PALADIN:
return PLAYER_CLASS_PALADIN_BIT;
case RANGER:
return PLAYER_CLASS_RANGER_BIT;
case SHADOWKNIGHT:
return PLAYER_CLASS_SHADOWKNIGHT_BIT;
case DRUID:
return PLAYER_CLASS_DRUID_BIT;
case MONK:
return PLAYER_CLASS_MONK_BIT;
case BARD:
return PLAYER_CLASS_BARD_BIT;
case ROGUE:
return PLAYER_CLASS_ROGUE_BIT;
case SHAMAN:
return PLAYER_CLASS_SHAMAN_BIT;
case NECROMANCER:
return PLAYER_CLASS_NECROMANCER_BIT;
case WIZARD:
return PLAYER_CLASS_WIZARD_BIT;
case MAGICIAN:
return PLAYER_CLASS_MAGICIAN_BIT;
case ENCHANTER:
return PLAYER_CLASS_ENCHANTER_BIT;
case BEASTLORD:
return PLAYER_CLASS_BEASTLORD_BIT;
case BERSERKER:
return PLAYER_CLASS_BERSERKER_BIT;
default:
return PLAYER_CLASS_UNKNOWN_BIT;
}
}
uint8 GetClassIDFromPlayerClassValue(uint32 player_class_value)
{
switch (player_class_value) {
case PLAYER_CLASS_WARRIOR:
case PLAYER_CLASS_CLERIC:
case PLAYER_CLASS_PALADIN:
case PLAYER_CLASS_RANGER:
case PLAYER_CLASS_SHADOWKNIGHT:
case PLAYER_CLASS_DRUID:
case PLAYER_CLASS_MONK:
case PLAYER_CLASS_BARD:
case PLAYER_CLASS_ROGUE:
case PLAYER_CLASS_SHAMAN:
case PLAYER_CLASS_NECROMANCER:
case PLAYER_CLASS_WIZARD:
case PLAYER_CLASS_MAGICIAN:
case PLAYER_CLASS_ENCHANTER:
case PLAYER_CLASS_BEASTLORD:
case PLAYER_CLASS_BERSERKER:
return player_class_value;
default:
return PLAYER_CLASS_UNKNOWN; // watch
}
}
uint8 GetClassIDFromPlayerClassBit(uint32 player_class_bit)
{
switch (player_class_bit) {
case PLAYER_CLASS_WARRIOR_BIT:
return WARRIOR;
case PLAYER_CLASS_CLERIC_BIT:
return CLERIC;
case PLAYER_CLASS_PALADIN_BIT:
return PALADIN;
case PLAYER_CLASS_RANGER_BIT:
return RANGER;
case PLAYER_CLASS_SHADOWKNIGHT_BIT:
return SHADOWKNIGHT;
case PLAYER_CLASS_DRUID_BIT:
return DRUID;
case PLAYER_CLASS_MONK_BIT:
return MONK;
case PLAYER_CLASS_BARD_BIT:
return BARD;
case PLAYER_CLASS_ROGUE_BIT:
return ROGUE;
case PLAYER_CLASS_SHAMAN_BIT:
return SHAMAN;
case PLAYER_CLASS_NECROMANCER_BIT:
return NECROMANCER;
case PLAYER_CLASS_WIZARD_BIT:
return WIZARD;
case PLAYER_CLASS_MAGICIAN_BIT:
return MAGICIAN;
case PLAYER_CLASS_ENCHANTER_BIT:
return ENCHANTER;
case PLAYER_CLASS_BEASTLORD_BIT:
return BEASTLORD;
case PLAYER_CLASS_BERSERKER_BIT:
return BERSERKER;
default:
return PLAYER_CLASS_UNKNOWN; // watch
}
}
bool IsFighterClass(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case PALADIN:
case RANGER:
case SHADOWKNIGHT:
case MONK:
case BARD:
case ROGUE:
case BEASTLORD:
case BERSERKER:
return true;
default:
return false;
}
}
bool IsSpellFighterClass(uint8 class_id)
{
switch (class_id) {
case PALADIN:
case RANGER:
case SHADOWKNIGHT:
case BEASTLORD:
return true;
default:
return false;
}
}
bool IsNonSpellFighterClass(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case MONK:
case BARD:
case ROGUE:
case BERSERKER:
return true;
default:
return false;
}
}
bool IsCasterClass(uint8 class_id)
{
switch (class_id) {
case CLERIC:
case DRUID:
case SHAMAN:
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return true;
default:
return false;
}
}
bool IsINTCasterClass(uint8 class_id)
{
switch (class_id) {
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return true;
default:
return false;
}
}
bool IsWISCasterClass(uint8 class_id)
{
switch (class_id) {
case CLERIC:
case DRUID:
case SHAMAN:
return true;
default:
return false;
}
}
bool IsPlateClass(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case CLERIC:
case PALADIN:
case SHADOWKNIGHT:
case BARD:
return true;
default:
return false;
}
}
bool IsChainClass(uint8 class_id)
{
switch (class_id) {
case RANGER:
case ROGUE:
case SHAMAN:
case BERSERKER:
return true;
default:
return false;
}
}
bool IsLeatherClass(uint8 class_id)
{
switch (class_id) {
case DRUID:
case MONK:
case BEASTLORD:
return true;
default:
return false;
}
}
bool IsClothClass(uint8 class_id)
{
switch (class_id) {
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return true;
default:
return false;
}
}
uint8 ClassArmorType(uint8 class_id)
{
switch (class_id) {
case WARRIOR:
case CLERIC:
case PALADIN:
case SHADOWKNIGHT:
case BARD:
return ARMOR_TYPE_PLATE;
case RANGER:
case ROGUE:
case SHAMAN:
case BERSERKER:
return ARMOR_TYPE_CHAIN;
case DRUID:
case MONK:
case BEASTLORD:
return ARMOR_TYPE_LEATHER;
case NECROMANCER:
case WIZARD:
case MAGICIAN:
case ENCHANTER:
return ARMOR_TYPE_CLOTH;
default:
return ARMOR_TYPE_UNKNOWN;
}
}
+100 -42
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,26 +17,25 @@
*/
#ifndef CLASSES_CH
#define CLASSES_CH
#include "../common/types.h"
#define Array_Class_UNKNOWN 0
#define WARRIOR 1
#define CLERIC 2
#define PALADIN 3
#define RANGER 4
#define SHADOWKNIGHT 5
#define DRUID 6
#define MONK 7
#define BARD 8
#define ROGUE 9
#define SHAMAN 10
#define NECROMANCER 11
#define WIZARD 12
#define MAGICIAN 13
#define ENCHANTER 14
#define BEASTLORD 15
#define BERSERKER 16
#define PLAYER_CLASS_COUNT 16 // used for array defines, must be the count of playable classes
#define WARRIOR 1
#define CLERIC 2
#define PALADIN 3
#define RANGER 4
#define SHADOWKNIGHT 5
#define DRUID 6
#define MONK 7
#define BARD 8
#define ROGUE 9
#define SHAMAN 10
#define NECROMANCER 11
#define WIZARD 12
#define MAGICIAN 13
#define ENCHANTER 14
#define BEASTLORD 15
#define BERSERKER 16
#define WARRIORGM 20
#define CLERICGM 21
#define PALADINGM 22
@@ -58,33 +57,92 @@
#define DISCORD_MERCHANT 59
#define ADVENTURERECRUITER 60
#define ADVENTUREMERCHANT 61
#define LDON_TREASURE 62 //objects you can use /open on first seen in LDONs
#define CORPSE_CLASS 62 //only seen on Danvi's Corpse in Akheva so far..
#define TRIBUTE_MASTER 63
#define GUILD_TRIBUTE_MASTER 64 //not sure
#define LDON_TREASURE 62 // objects you can use /open on first seen in LDONs
#define CORPSE_CLASS 62 // only seen on Danvi's Corpse in Akheva so far..
#define TRIBUTE_MASTER 63
#define GUILD_TRIBUTE_MASTER 64 // not sure
#define NORRATHS_KEEPERS_MERCHANT 67
#define DARK_REIGN_MERCHANT 68
#define FELLOWSHIP_MASTER 69
#define ALT_CURRENCY_MERCHANT 70
#define MERCERNARY_MASTER 71
#define warrior_1 1
#define monk_1 64
#define paladin_1 4
#define shadow_1 16
#define bard_1 128
#define cleric_1 2
#define necromancer_1 1024
#define ranger_1 8
#define druid_1 32
#define mage_1 4096
#define wizard_1 2048
#define enchanter_1 8192
#define rogue_1 256
#define shaman_1 512
#define beastlord_1 16384
#define berserker_1 32768
#define call_1 65536
const char* GetEQClassName(uint8 class_, uint8 level = 0);
// player class values
#define PLAYER_CLASS_UNKNOWN 0
#define PLAYER_CLASS_WARRIOR 1
#define PLAYER_CLASS_CLERIC 2
#define PLAYER_CLASS_PALADIN 3
#define PLAYER_CLASS_RANGER 4
#define PLAYER_CLASS_SHADOWKNIGHT 5
#define PLAYER_CLASS_DRUID 6
#define PLAYER_CLASS_MONK 7
#define PLAYER_CLASS_BARD 8
#define PLAYER_CLASS_ROGUE 9
#define PLAYER_CLASS_SHAMAN 10
#define PLAYER_CLASS_NECROMANCER 11
#define PLAYER_CLASS_WIZARD 12
#define PLAYER_CLASS_MAGICIAN 13
#define PLAYER_CLASS_ENCHANTER 14
#define PLAYER_CLASS_BEASTLORD 15
#define PLAYER_CLASS_BERSERKER 16
#define PLAYER_CLASS_COUNT 16
// player class bits
#define PLAYER_CLASS_UNKNOWN_BIT 0
#define PLAYER_CLASS_WARRIOR_BIT 1
#define PLAYER_CLASS_CLERIC_BIT 2
#define PLAYER_CLASS_PALADIN_BIT 4
#define PLAYER_CLASS_RANGER_BIT 8
#define PLAYER_CLASS_SHADOWKNIGHT_BIT 16
#define PLAYER_CLASS_DRUID_BIT 32
#define PLAYER_CLASS_MONK_BIT 64
#define PLAYER_CLASS_BARD_BIT 128
#define PLAYER_CLASS_ROGUE_BIT 256
#define PLAYER_CLASS_SHAMAN_BIT 512
#define PLAYER_CLASS_NECROMANCER_BIT 1024
#define PLAYER_CLASS_WIZARD_BIT 2048
#define PLAYER_CLASS_MAGICIAN_BIT 4096
#define PLAYER_CLASS_ENCHANTER_BIT 8192
#define PLAYER_CLASS_BEASTLORD_BIT 16384
#define PLAYER_CLASS_BERSERKER_BIT 32768
#define PLAYER_CLASS_ALL_MASK 65535 // was 65536
#define ARMOR_TYPE_UNKNOWN 0
#define ARMOR_TYPE_CLOTH 1
#define ARMOR_TYPE_LEATHER 2
#define ARMOR_TYPE_CHAIN 3
#define ARMOR_TYPE_PLATE 4
#define ARMOR_TYPE_FIRST ARMOR_TYPE_UNKNOWN
#define ARMOR_TYPE_LAST ARMOR_TYPE_PLATE
#define ARMOR_TYPE_COUNT 5
const char* GetClassIDName(uint8 class_id, uint8 level = 0);
const char* GetPlayerClassName(uint32 player_class_value, uint8 level = 0);
uint32 GetPlayerClassValue(uint8 class_id);
uint32 GetPlayerClassBit(uint8 class_id);
uint8 GetClassIDFromPlayerClassValue(uint32 player_class_value);
uint8 GetClassIDFromPlayerClassBit(uint32 player_class_bit);
bool IsFighterClass(uint8 class_id);
bool IsSpellFighterClass(uint8 class_id);
bool IsNonSpellFighterClass(uint8 class_id);
bool IsCasterClass(uint8 class_id);
bool IsINTCasterClass(uint8 class_id);
bool IsWISCasterClass(uint8 class_id);
bool IsPlateClass(uint8 class_id);
bool IsChainClass(uint8 class_id);
bool IsLeatherClass(uint8 class_id);
bool IsClothClass(uint8 class_id);
uint8 ClassArmorType(uint8 class_id);
#endif
+2 -2
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -88,7 +88,7 @@ class Database : public DBcore {
public:
Database();
Database(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
bool Connect(const char* host, const char* user, const char* passwd, const char* database, uint32 port);
~Database();
/* Character Creation */
+67 -25
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -390,30 +390,47 @@ enum {
ET_Scroll = 7
};
//SpawnAppearance types:
#define AT_Die 0 // this causes the client to keel over and zone to bind point
#define AT_WhoLevel 1 // the level that shows up on /who
#define AT_Invis 3 // 0 = visible, 1 = invisible
#define AT_PVP 4 // 0 = blue, 1 = pvp (red)
#define AT_Light 5 // light type emitted by player (lightstone, shiny shield)
#define AT_Anim 14 // 100=standing, 110=sitting, 111=ducking, 115=feigned, 105=looting
#define AT_Sneak 15 // 0 = normal, 1 = sneaking
#define AT_SpawnID 16 // server to client, sets player spawn id
#define AT_HP 17 // Client->Server, my HP has changed (like regen tic)
#define AT_Linkdead 18 // 0 = normal, 1 = linkdead
#define AT_Levitate 19 // 0=off, 1=flymode, 2=levitate
#define AT_GM 20 // 0 = normal, 1 = GM - all odd numbers seem to make it GM
#define AT_Anon 21 // 0 = normal, 1 = anon, 2 = roleplay
#define AT_GuildID 22
#define AT_GuildRank 23 // 0=member, 1=officer, 2=leader
#define AT_AFK 24 // 0 = normal, 1 = afk
#define AT_Pet 25 // Param is EntityID of owner, or 0 for when charm breaks
#define AT_Split 28 // 0 = normal, 1 = autosplit on
#define AT_Size 29 // spawn's size
#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
#define AT_ShowHelm 43 // 0 = do not show helmet graphic, 1 = show graphic
#define AT_DamageState 44 // The damage state of a destructible object (0 through 4)
//#define AT_Trader 300 // Bazzar Trader Mode
//SpawnAppearance types: (compared two clients for server-originating types: SoF & RoF2)
#define AT_Die 0 // this causes the client to keel over and zone to bind point (default action)
#define AT_WhoLevel 1 // the level that shows up on /who
//#define AT_2 2 // unknown
#define AT_Invis 3 // 0 = visible, 1 = invisible
#define AT_PVP 4 // 0 = blue, 1 = pvp (red)
#define AT_Light 5 // light type emitted by player (lightstone, shiny shield)
#define AT_Anim 14 // 100=standing, 110=sitting, 111=ducking, 115=feigned, 105=looting
#define AT_Sneak 15 // 0 = normal, 1 = sneaking
#define AT_SpawnID 16 // server to client, sets player spawn id
#define AT_HP 17 // Client->Server, my HP has changed (like regen tic)
#define AT_Linkdead 18 // 0 = normal, 1 = linkdead
#define AT_Levitate 19 // 0=off, 1=flymode, 2=levitate
#define AT_GM 20 // 0 = normal, 1 = GM - all odd numbers seem to make it GM
#define AT_Anon 21 // 0 = normal, 1 = anon, 2 = roleplay
#define AT_GuildID 22
#define AT_GuildRank 23 // 0=member, 1=officer, 2=leader
#define AT_AFK 24 // 0 = normal, 1 = afk
#define AT_Pet 25 // Param is EntityID of owner, or 0 for when charm breaks
//#define AT_27 27 // unknown
#define AT_Split 28 // 0 = normal, 1 = autosplit on (not showing in SoF+) (client-to-server only)
#define AT_Size 29 // spawn's size (present: SoF, absent: RoF2)
//#define AT_30 30 // unknown
#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
//#define AT_32 32 // unknown
//#define AT_33 33 // unknown
//#define AT_34 34 // unknown (present: SoF, absent: RoF2)
//#define AT_35 35 // unknown
//#define AT_36 36 // unknown
//#define AT_37 37 // unknown
//#define AT_38 38 // unknown
//#define AT_39 39 // unknown
#define AT_ShowHelm 43 // 0 = hide graphic, 1 = show graphic
#define AT_DamageState 44 // The damage state of a destructible object (0 through 4)
//#define AT_46 46 // unknown
//#define AT_48 48 // unknown
//#define AT_49 49 // unknown
//#define AT_52 52 // (absent: SoF, present: RoF2) (not a replacement for RoF absent 29 or 34)
//#define AT_53 53 // (absent: SoF, present: RoF2) (not a replacement for RoF absent 29 or 34)
//#define AT_Trader 300 // Bazaar Trader Mode (not present in SoF or RoF2)
// animations for AT_Anim
#define ANIM_FREEZE 102
@@ -519,15 +536,40 @@ typedef enum {
#define MT_StrikeThrough 339
#define MT_Stun 340
// TODO: Really should combine above and below into one
//from showeq
enum ChatColor
{
/*
CC_Default = 0,
CC_DarkGrey = 1,
CC_DarkGreen = 2,
CC_DarkBlue = 3,
CC_Purple = 5,
CC_LightGrey = 6,
*/
CC_WhiteSmoke = 0, // FF|F0F0F0
CC_Green = 2, // FF|008000
CC_BrightBlue = 3, // FF|0040FF
CC_Magenta = 5, // FF|F000F0
CC_Gray = 6, // FF|808080
CC_LightGray = 7, // FF|E0E0E0
//CC_WhiteSmoke2 = 10, // FF|F0F0F0
CC_DarkGray = 12, // FF|A0A0A0
CC_Red = 13, // FF|F00000
CC_Lime = 14, // FF|00F000
CC_Yellow = 15, // FF|F0F000
CC_Blue = 16, // FF|0000F0
CC_LightNavy = 17, // FF|0000AF
CC_Cyan = 18, // FF|00F0F0
CC_Black = 20, // FF|000000
// any index <= 255 that is not defined above
CC_DimGray = 1, // FF|606060
CC_Default = 1,
CC_User_Say = 256,
CC_User_Tell = 257,
CC_User_Group = 258,
+2 -2
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3063,7 +3063,7 @@ bool Item_Struct::IsEquipable(uint16 Race, uint16 Class_) const
uint32 Classes_ = Classes;
uint32 Races_ = Races;
uint32 Race_ = GetArrayRace(Race);
uint32 Race_ = GetPlayerRaceValue(Race);
for (int CurrentClass = 1; CurrentClass <= PLAYER_CLASS_COUNT; ++CurrentClass) {
if (Classes_ & 1) {
+23
View File
@@ -1,3 +1,20 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.org)
This program 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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define ENCODE(x) void Strategy::Encode_##x(EQApplicationPacket **p, std::shared_ptr<EQStream> dest, bool ack_req)
#define DECODE(x) void Strategy::Decode_##x(EQApplicationPacket *__packet)
@@ -116,6 +133,12 @@
//a shorter assignment for direct mode
#undef IN
#define IN(x) emu->x = eq->x;
#define IN_str(x) \
strncpy(emu->x, eq->x, sizeof(emu->x)); \
emu->x[sizeof(emu->x)-1] = '\0';
#define IN_array(x, n) \
for(__i = 0; __i < n; __i++) \
emu->x[__i] = eq->x[__i];
//call before any premature returns in an encoder using SETUP_DIRECT_DECODE
#define FAIL_DIRECT_DECODE() \
+823 -87
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,95 +18,831 @@
#include "../common/races.h"
const char* GetRaceName(uint16 race) {
switch(race) {
case HUMAN:
return "Human";
case BARBARIAN:
return "Barbarian";
case ERUDITE:
return "Erudite";
case WOOD_ELF:
return "Wood Elf";
case HIGH_ELF:
return "High Elf";
case DARK_ELF:
return "Dark Elf";
case HALF_ELF:
return "Half Elf";
case DWARF:
return "Dwarf";
case TROLL:
return "Troll";
case OGRE:
return "Ogre";
case HALFLING:
return "Halfling";
case GNOME:
return "Gnome";
case IKSAR:
return "Iksar";
case WEREWOLF:
return "Werewolf";
case SKELETON:
return "Skeleton";
case ELEMENTAL:
return "Elemental";
case EYE_OF_ZOMM:
return "Eye of Zomm";
case WOLF_ELEMENTAL:
return "Wolf Elemental";
case IKSAR_SKELETON:
return "Iksar Skeleton";
case VAHSHIR:
return "Vah Shir";
case FROGLOK:
case FROGLOK2:
return "Froglok";
case DRAKKIN:
return "Drakkin";
default:
return "Unknown";
const char* GetRaceIDName(uint16 race_id)
{
switch (race_id) {
case HUMAN:
return "Human";
case BARBARIAN:
return "Barbarian";
case ERUDITE:
return "Erudite";
case WOOD_ELF:
return "Wood Elf";
case HIGH_ELF:
return "High Elf";
case DARK_ELF:
return "Dark Elf";
case HALF_ELF:
return "Half Elf";
case DWARF:
return "Dwarf";
case TROLL:
return "Troll";
case OGRE:
return "Ogre";
case HALFLING:
return "Halfling";
case GNOME:
return "Gnome";
case IKSAR:
return "Iksar";
case WEREWOLF:
return "Werewolf";
case SKELETON:
return "Skeleton";
case ELEMENTAL:
return "Elemental";
case EYE_OF_ZOMM:
return "Eye of Zomm";
case WOLF_ELEMENTAL:
return "Wolf Elemental";
case IKSAR_SKELETON:
return "Iksar Skeleton";
case VAHSHIR:
return "Vah Shir";
case FROGLOK:
case FROGLOK2:
return "Froglok";
case DRAKKIN:
return "Drakkin";
default:
return "Unknown";
}
}
uint32 GetArrayRace(uint16 race) {
switch(race) {
case HUMAN:
return Array_Race_HUMAN;
case BARBARIAN:
return Array_Race_BARBARIAN;
case ERUDITE:
return Array_Race_ERUDITE;
case WOOD_ELF:
return Array_Race_WOOD_ELF;
case HIGH_ELF:
return Array_Race_HIGH_ELF;
case DARK_ELF:
return Array_Race_DARK_ELF;
case HALF_ELF:
return Array_Race_HALF_ELF;
case DWARF:
return Array_Race_DWARF;
case TROLL:
return Array_Race_TROLL;
case OGRE:
return Array_Race_OGRE;
case HALFLING:
return Array_Race_HALFLING;
case GNOME:
return Array_Race_GNOME;
case IKSAR:
return Array_Race_IKSAR;
case VAHSHIR:
return Array_Race_VAHSHIR;
case FROGLOK:
case FROGLOK2:
return Array_Race_FROGLOK;
case DRAKKIN:
return Array_Race_DRAKKIN;
default:
return Array_Race_UNKNOWN;
const char* GetPlayerRaceName(uint32 player_race_value)
{
return GetRaceIDName(GetRaceIDFromPlayerRaceValue(player_race_value));
}
uint32 GetPlayerRaceValue(uint16 race_id)
{
switch (race_id) {
case HUMAN:
case BARBARIAN:
case ERUDITE:
case WOOD_ELF:
case HIGH_ELF:
case DARK_ELF:
case HALF_ELF:
case DWARF:
case TROLL:
case OGRE:
case HALFLING:
case GNOME:
return race_id;
case IKSAR:
return PLAYER_RACE_IKSAR;
case VAHSHIR:
return PLAYER_RACE_VAHSHIR;
case FROGLOK:
case FROGLOK2:
return PLAYER_RACE_FROGLOK;
case DRAKKIN:
return PLAYER_RACE_DRAKKIN;
default:
return PLAYER_RACE_UNKNOWN; // watch
}
}
uint32 GetPlayerRaceBit(uint16 race_id)
{
switch (race_id) {
case HUMAN:
return PLAYER_RACE_HUMAN_BIT;
case BARBARIAN:
return PLAYER_RACE_BARBARIAN_BIT;
case ERUDITE:
return PLAYER_RACE_ERUDITE_BIT;
case WOOD_ELF:
return PLAYER_RACE_WOOD_ELF_BIT;
case HIGH_ELF:
return PLAYER_RACE_HIGH_ELF_BIT;
case DARK_ELF:
return PLAYER_RACE_DARK_ELF_BIT;
case HALF_ELF:
return PLAYER_RACE_HALF_ELF_BIT;
case DWARF:
return PLAYER_RACE_DWARF_BIT;
case TROLL:
return PLAYER_RACE_TROLL_BIT;
case OGRE:
return PLAYER_RACE_OGRE_BIT;
case HALFLING:
return PLAYER_RACE_HALFLING_BIT;
case GNOME:
return PLAYER_RACE_GNOME_BIT;
case IKSAR:
return PLAYER_RACE_IKSAR_BIT;
case VAHSHIR:
return PLAYER_RACE_VAHSHIR_BIT;
case FROGLOK:
return PLAYER_RACE_FROGLOK_BIT;
case DRAKKIN:
return PLAYER_RACE_DRAKKIN_BIT;
default:
return PLAYER_RACE_UNKNOWN_BIT;
}
}
uint16 GetRaceIDFromPlayerRaceValue(uint32 player_race_value)
{
switch (player_race_value) {
case PLAYER_RACE_HUMAN:
case PLAYER_RACE_BARBARIAN:
case PLAYER_RACE_ERUDITE:
case PLAYER_RACE_WOOD_ELF:
case PLAYER_RACE_HIGH_ELF:
case PLAYER_RACE_DARK_ELF:
case PLAYER_RACE_HALF_ELF:
case PLAYER_RACE_DWARF:
case PLAYER_RACE_TROLL:
case PLAYER_RACE_OGRE:
case PLAYER_RACE_HALFLING:
case PLAYER_RACE_GNOME:
return player_race_value;
case PLAYER_RACE_IKSAR:
return IKSAR;
case PLAYER_RACE_VAHSHIR:
return VAHSHIR;
case PLAYER_RACE_FROGLOK:
return FROGLOK;
case PLAYER_RACE_DRAKKIN:
return DRAKKIN;
default:
return PLAYER_RACE_UNKNOWN; // watch
}
}
uint16 GetRaceIDFromPlayerRaceBit(uint32 player_race_bit)
{
switch (player_race_bit) {
case PLAYER_RACE_HUMAN_BIT:
return HUMAN;
case PLAYER_RACE_BARBARIAN_BIT:
return BARBARIAN;
case PLAYER_RACE_ERUDITE_BIT:
return ERUDITE;
case PLAYER_RACE_WOOD_ELF_BIT:
return WOOD_ELF;
case PLAYER_RACE_HIGH_ELF_BIT:
return HIGH_ELF;
case PLAYER_RACE_DARK_ELF_BIT:
return DARK_ELF;
case PLAYER_RACE_HALF_ELF_BIT:
return HALF_ELF;
case PLAYER_RACE_DWARF_BIT:
return DWARF;
case PLAYER_RACE_TROLL_BIT:
return TROLL;
case PLAYER_RACE_OGRE_BIT:
return OGRE;
case PLAYER_RACE_HALFLING_BIT:
return HALFLING;
case PLAYER_RACE_GNOME_BIT:
return GNOME;
case PLAYER_RACE_IKSAR_BIT:
return IKSAR;
case PLAYER_RACE_VAHSHIR_BIT:
return VAHSHIR;
case PLAYER_RACE_FROGLOK_BIT:
return FROGLOK;
case PLAYER_RACE_DRAKKIN_BIT:
return DRAKKIN;
default:
return PLAYER_RACE_UNKNOWN; // watch
}
}
// PlayerAppearance prep
#define HUMAN_MALE ((HUMAN << 8) | MALE)
#define HUMAN_FEMALE ((HUMAN << 8) | FEMALE)
#define BARBARIAN_MALE ((BARBARIAN << 8) | MALE)
#define BARBARIAN_FEMALE ((BARBARIAN << 8) | FEMALE)
#define ERUDITE_MALE ((ERUDITE << 8) | MALE)
#define ERUDITE_FEMALE ((ERUDITE << 8) | FEMALE)
#define WOOD_ELF_MALE ((WOOD_ELF << 8) | MALE)
#define WOOD_ELF_FEMALE ((WOOD_ELF << 8) | FEMALE)
#define HIGH_ELF_MALE ((HIGH_ELF << 8) | MALE)
#define HIGH_ELF_FEMALE ((HIGH_ELF << 8) | FEMALE)
#define DARK_ELF_MALE ((DARK_ELF << 8) | MALE)
#define DARK_ELF_FEMALE ((DARK_ELF << 8) | FEMALE)
#define HALF_ELF_MALE ((HALF_ELF << 8) | MALE)
#define HALF_ELF_FEMALE ((HALF_ELF << 8) | FEMALE)
#define DWARF_MALE ((DWARF << 8) | MALE)
#define DWARF_FEMALE ((DWARF << 8) | FEMALE)
#define TROLL_MALE ((TROLL << 8) | MALE)
#define TROLL_FEMALE ((TROLL << 8) | FEMALE)
#define OGRE_MALE ((OGRE << 8) | MALE)
#define OGRE_FEMALE ((OGRE << 8) | FEMALE)
#define HALFLING_MALE ((HALFLING << 8) | MALE)
#define HALFLING_FEMALE ((HALFLING << 8) | FEMALE)
#define GNOME_MALE ((GNOME << 8) | MALE)
#define GNOME_FEMALE ((GNOME << 8) | FEMALE)
#define IKSAR_MALE ((IKSAR << 8) | MALE)
#define IKSAR_FEMALE ((IKSAR << 8) | FEMALE)
#define VAHSHIR_MALE ((VAHSHIR << 8) | MALE)
#define VAHSHIR_FEMALE ((VAHSHIR << 8) | FEMALE)
#define FROGLOK_MALE ((FROGLOK << 8) | MALE)
#define FROGLOK_FEMALE ((FROGLOK << 8) | FEMALE)
#define DRAKKIN_MALE ((DRAKKIN << 8) | MALE)
#define DRAKKIN_FEMALE ((DRAKKIN << 8) | FEMALE)
#define BINDRG(r, g) (((int)r << 8) | g)
bool PlayerAppearance::IsValidBeard(uint16 race_id, uint8 gender_id, uint8 beard_value, bool use_luclin)
{
if (beard_value == 0xFF)
return true;
if (use_luclin) {
switch (BINDRG(race_id, gender_id)) {
case DWARF_FEMALE:
if (beard_value <= 1)
return true;
break;
case HIGH_ELF_MALE:
case DARK_ELF_MALE:
case HALF_ELF_MALE:
case DRAKKIN_FEMALE:
if (beard_value <= 3)
return true;
break;
case HUMAN_MALE:
case BARBARIAN_MALE:
case ERUDITE_MALE:
case DWARF_MALE:
case HALFLING_MALE:
case GNOME_MALE:
if (beard_value <= 5)
return true;
break;
case DRAKKIN_MALE:
if (beard_value <= 11)
return true;
break;
default:
break;
}
return false;
}
else {
switch (BINDRG(race_id, gender_id)) {
case DRAKKIN_FEMALE:
if (beard_value <= 3)
return true;
break;
case DRAKKIN_MALE:
if (beard_value <= 11)
return true;
break;
default:
break;
}
return false;
}
}
bool PlayerAppearance::IsValidBeardColor(uint16 race_id, uint8 gender_id, uint8 beard_color_value, bool use_luclin)
{
if (beard_color_value == 0xFF)
return true;
switch (BINDRG(race_id, gender_id)) {
case GNOME_MALE:
if (beard_color_value <= 24)
return true;
break;
case HUMAN_MALE:
case BARBARIAN_MALE:
case ERUDITE_MALE:
case HALF_ELF_MALE:
case DWARF_MALE:
case DWARF_FEMALE:
case HALFLING_MALE:
if (beard_color_value <= 19)
return true;
break;
case DARK_ELF_MALE:
if (beard_color_value >= 13 && beard_color_value <= 18)
return true;
break;
case HIGH_ELF_MALE:
if (beard_color_value <= 14)
return true;
break;
case FROGLOK_MALE:
case FROGLOK_FEMALE:
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (beard_color_value <= 3)
return true;
break;
default:
break;
}
return false;
}
bool PlayerAppearance::IsValidDetail(uint16 race_id, uint8 gender_id, uint32 detail_value, bool use_luclin)
{
if (detail_value == 0xFFFFFFFF)
return true;
switch (BINDRG(race_id, gender_id)) {
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (detail_value <= 7)
return true;
break;
default:
break;
}
return false;
}
bool PlayerAppearance::IsValidEyeColor(uint16 race_id, uint8 gender_id, uint8 eye_color_value, bool use_luclin)
{
return true; // need valid criteria
switch (BINDRG(race_id, gender_id)) {
case HUMAN_MALE:
case HUMAN_FEMALE:
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case ERUDITE_MALE:
case ERUDITE_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case OGRE_MALE:
case OGRE_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
case GNOME_MALE:
case GNOME_FEMALE:
case IKSAR_MALE:
case IKSAR_FEMALE:
case VAHSHIR_MALE:
case VAHSHIR_FEMALE:
if (eye_color_value <= 9)
return true;
break;
case TROLL_MALE:
case TROLL_FEMALE:
if (eye_color_value <= 10)
return true;
break;
case FROGLOK_MALE:
case FROGLOK_FEMALE:
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (eye_color_value <= 11)
return true;
break;
default:
break;
}
return false;
}
bool PlayerAppearance::IsValidFace(uint16 race_id, uint8 gender_id, uint8 face_value, bool use_luclin)
{
if (face_value == 0xFF)
return true;
switch (BINDRG(race_id, gender_id)) {
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (face_value <= 6)
return true;
break;
case HUMAN_MALE:
case HUMAN_FEMALE:
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case ERUDITE_MALE:
case ERUDITE_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case TROLL_MALE:
case TROLL_FEMALE:
case OGRE_MALE:
case OGRE_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
case GNOME_MALE:
case GNOME_FEMALE:
case IKSAR_MALE:
case IKSAR_FEMALE:
case VAHSHIR_MALE:
case VAHSHIR_FEMALE:
if (face_value <= 7)
return true;
break;
case FROGLOK_MALE:
case FROGLOK_FEMALE:
if (face_value <= 9)
return true;
break;
default:
break;
}
return false;
}
bool PlayerAppearance::IsValidHair(uint16 race_id, uint8 gender_id, uint8 hair_value, bool use_luclin)
{
if (hair_value == 0xFF)
return true;
if (use_luclin) {
switch (BINDRG(race_id, gender_id)) {
case HUMAN_MALE:
case HUMAN_FEMALE:
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case TROLL_FEMALE:
case OGRE_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
case GNOME_MALE:
case GNOME_FEMALE:
if (hair_value <= 3)
return true;
break;
case ERUDITE_MALE:
if (hair_value <= 5)
return true;
break;
case DRAKKIN_FEMALE:
if (hair_value <= 7)
return true;
break;
case ERUDITE_FEMALE:
case DRAKKIN_MALE:
if (hair_value <= 8)
return true;
break;
default:
break;
}
return false;
}
else {
switch (BINDRG(race_id, gender_id)) {
case DRAKKIN_FEMALE:
if (hair_value <= 7)
return true;
break;
case DRAKKIN_MALE:
if (hair_value <= 8)
return true;
break;
default:
break;
}
return false;
}
}
bool PlayerAppearance::IsValidHairColor(uint16 race_id, uint8 gender_id, uint8 hair_color_value, bool use_luclin)
{
if (hair_color_value == 0xFF)
return true;
switch (BINDRG(race_id, gender_id)) {
case GNOME_MALE:
case GNOME_FEMALE:
if (hair_color_value <= 24)
return true;
break;
case TROLL_FEMALE:
case OGRE_FEMALE:
if (hair_color_value <= 23)
return true;
break;
case HUMAN_MALE:
case HUMAN_FEMALE:
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
if (hair_color_value <= 19)
return true;
break;
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
if (hair_color_value >= 13 && hair_color_value <= 18)
return true;
break;
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
if (hair_color_value <= 14)
return true;
break;
case FROGLOK_MALE:
case FROGLOK_FEMALE:
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (hair_color_value <= 3)
return true;
break;
default:
break;
}
return false;
}
bool PlayerAppearance::IsValidHead(uint16 race_id, uint8 gender_id, uint8 head_value, bool use_luclin)
{
if (head_value == 0xFF)
return true;
if (use_luclin) {
switch (BINDRG(race_id, gender_id)) {
case HUMAN_MALE:
case HUMAN_FEMALE:
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case TROLL_MALE:
case TROLL_FEMALE:
case OGRE_MALE:
case OGRE_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
case GNOME_MALE:
case GNOME_FEMALE:
case IKSAR_MALE:
case IKSAR_FEMALE:
case VAHSHIR_MALE:
case VAHSHIR_FEMALE:
case FROGLOK_MALE:
case FROGLOK_FEMALE:
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (head_value <= 3)
return true;
break;
case ERUDITE_MALE:
case ERUDITE_FEMALE:
if (head_value <= 4)
return true;
break;
default:
break;
}
return false;
}
else {
switch (BINDRG(race_id, gender_id)) {
case HUMAN_MALE:
case HUMAN_FEMALE:
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case ERUDITE_MALE:
case ERUDITE_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case TROLL_MALE:
case TROLL_FEMALE:
case OGRE_MALE:
case OGRE_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
case IKSAR_MALE:
case IKSAR_FEMALE:
case VAHSHIR_MALE:
case VAHSHIR_FEMALE:
case FROGLOK_MALE:
case FROGLOK_FEMALE:
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (head_value <= 3)
return true;
break;
case GNOME_MALE:
case GNOME_FEMALE:
if (head_value <= 4)
return true;
break;
default:
break;
}
return false;
}
}
bool PlayerAppearance::IsValidHeritage(uint16 race_id, uint8 gender_id, uint32 heritage_value, bool use_luclin)
{
if (heritage_value == 0xFFFFFFFF)
return true;
switch (BINDRG(race_id, gender_id)) {
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (heritage_value <= 7) // > 5 seems to jumble other features..else, some heritages have 'specialized' features
return true;
break;
default:
break;
}
return false;
}
bool PlayerAppearance::IsValidTattoo(uint16 race_id, uint8 gender_id, uint32 tattoo_value, bool use_luclin)
{
if (tattoo_value == 0xFFFFFFFF)
return true;
switch (BINDRG(race_id, gender_id)) {
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if (tattoo_value <= 7)
return true;
break;
default:
break;
}
return false;
}
bool PlayerAppearance::IsValidTexture(uint16 race_id, uint8 gender_id, uint8 texture_value, bool use_luclin)
{
if (texture_value == 0xFF)
return true;
if (use_luclin) {
switch (BINDRG(race_id, gender_id)) {
case HUMAN_MALE:
case HUMAN_FEMALE:
case IKSAR_MALE:
case IKSAR_FEMALE:
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if ((texture_value >= 10 && texture_value <= 16) || texture_value <= 4)
return true;
break;
case ERUDITE_MALE:
case ERUDITE_FEMALE:
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
case GNOME_MALE:
case GNOME_FEMALE:
case FROGLOK_MALE:
case FROGLOK_FEMALE:
if ((texture_value >= 10 && texture_value <= 16) || texture_value <= 3)
return true;
break;
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case TROLL_MALE:
case TROLL_FEMALE:
case OGRE_MALE:
case OGRE_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
case VAHSHIR_MALE:
case VAHSHIR_FEMALE:
if (texture_value <= 3)
return true;
break;
default:
break;
}
return false;
}
else {
switch (BINDRG(race_id, gender_id)) {
case HUMAN_MALE:
case HUMAN_FEMALE:
case ERUDITE_MALE:
case ERUDITE_FEMALE:
case DRAKKIN_MALE:
case DRAKKIN_FEMALE:
if ((texture_value >= 10 && texture_value <= 16) || texture_value <= 4)
return true;
break;
case HIGH_ELF_MALE:
case HIGH_ELF_FEMALE:
case DARK_ELF_MALE:
case DARK_ELF_FEMALE:
case GNOME_MALE:
case GNOME_FEMALE:
case FROGLOK_MALE:
case FROGLOK_FEMALE:
if ((texture_value >= 10 && texture_value <= 16) || texture_value <= 3)
return true;
break;
case VAHSHIR_MALE:
case VAHSHIR_FEMALE:
if (texture_value == 50 || texture_value <= 3)
return true;
break;
case IKSAR_MALE:
case IKSAR_FEMALE:
if (texture_value == 10 || texture_value <= 4)
return true;
break;
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
case WOOD_ELF_MALE:
case WOOD_ELF_FEMALE:
case HALF_ELF_MALE:
case HALF_ELF_FEMALE:
case DWARF_MALE:
case DWARF_FEMALE:
case TROLL_MALE:
case TROLL_FEMALE:
case OGRE_MALE:
case OGRE_FEMALE:
case HALFLING_MALE:
case HALFLING_FEMALE:
if (texture_value <= 3)
return true;
break;
default:
break;
}
return false;
}
}
bool PlayerAppearance::IsValidWoad(uint16 race_id, uint8 gender_id, uint8 woad_value, bool use_luclin)
{
if (woad_value == 0xFF)
return true;
if (use_luclin) {
switch (BINDRG(race_id, gender_id)) {
case BARBARIAN_MALE:
case BARBARIAN_FEMALE:
if (woad_value <= 8)
return true;
break;
default:
break;
}
}
return false;
}
+112 -74
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,92 +15,130 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef RACES_H
#define RACES_H
#include "../common/types.h"
#include <cmath>
#define MALE 0
#define FEMALE 1
#define NEUTER 2
//theres a big list straight from the client below.
#define HUMAN 1
#define BARBARIAN 2
#define ERUDITE 3
#define WOOD_ELF 4
#define HIGH_ELF 5
#define DARK_ELF 6
#define HALF_ELF 7
#define DWARF 8
#define TROLL 9
#define OGRE 10
#define HALFLING 11
#define GNOME 12
#define WEREWOLF 14
#define WOLF 42
#define BEAR 43
#define SKELETON 60
#define TIGER 63
#define ELEMENTAL 75
#define ALLIGATOR 91
#define EYE_OF_ZOMM 108
#define WOLF_ELEMENTAL 120
#define INVISIBLE_MAN 127
#define IKSAR 128
#define VAHSHIR 130
#define HUMAN 1
#define BARBARIAN 2
#define ERUDITE 3
#define WOOD_ELF 4
#define HIGH_ELF 5
#define DARK_ELF 6
#define HALF_ELF 7
#define DWARF 8
#define TROLL 9
#define OGRE 10
#define HALFLING 11
#define GNOME 12
#define WEREWOLF 14
#define WOLF 42
#define BEAR 43
#define SKELETON 60
#define TIGER 63
#define ELEMENTAL 75
#define ALLIGATOR 91
#define EYE_OF_ZOMM 108
#define WOLF_ELEMENTAL 120
#define INVISIBLE_MAN 127
#define IKSAR 128
#define VAHSHIR 130
#define CONTROLLED_BOAT 141
#define MINOR_ILL_OBJ 142
#define TREE 143
#define IKSAR_SKELETON 161
#define FROGLOK 330
#define FROGLOK2 74 // Not sure why /who all reports race as 74 for frogloks
#define DRAKKIN 522 // 32768
#define EMU_RACE_NPC 131069 // was 65533
#define EMU_RACE_PET 131070 // was 65534
#define MINOR_ILL_OBJ 142
#define TREE 143
#define IKSAR_SKELETON 161
#define FROGLOK 330
// TODO: check all clients for (BYTE) usage of '/who all' class and remove FROGLOK2, if possible (330 - 74 = 256 .. WORD->BYTE conversion loss...)
#define FROGLOK2 74 // Not sure why /who all reports race as 74 for frogloks
#define FAIRY 473
#define DRAKKIN 522 // 32768
#define EMU_RACE_NPC 131069 // was 65533
#define EMU_RACE_PET 131070 // was 65534
#define EMU_RACE_UNKNOWN 131071 // was 65535
#define human_1 1
#define barbarian_1 2
#define erudite_1 4
#define woodelf_1 8
#define highelf_1 16
#define darkelf_1 32
#define halfelf_1 64
#define dwarf_1 128
#define troll_1 256
#define ogre_1 512
#define halfling_1 1024
#define gnome_1 2048
#define iksar_1 4096
#define vahshir_1 8192
#define rall_1 16384 //froglok?
#define drakkin_1 32768
// player race values
#define PLAYER_RACE_UNKNOWN 0
#define PLAYER_RACE_HUMAN 1
#define PLAYER_RACE_BARBARIAN 2
#define PLAYER_RACE_ERUDITE 3
#define PLAYER_RACE_WOOD_ELF 4
#define PLAYER_RACE_HIGH_ELF 5
#define PLAYER_RACE_DARK_ELF 6
#define PLAYER_RACE_HALF_ELF 7
#define PLAYER_RACE_DWARF 8
#define PLAYER_RACE_TROLL 9
#define PLAYER_RACE_OGRE 10
#define PLAYER_RACE_HALFLING 11
#define PLAYER_RACE_GNOME 12
#define PLAYER_RACE_IKSAR 13
#define PLAYER_RACE_VAHSHIR 14
#define PLAYER_RACE_FROGLOK 15
#define PLAYER_RACE_DRAKKIN 16
const char* GetRaceName(uint16 race);
#define PLAYER_RACE_COUNT 16
uint32 GetArrayRace(uint16 race);
inline uint32 GetRaceBitmask(uint16 race) { return uint32(pow(2.0f, float(GetArrayRace(race) - 1))); }
#define Array_Race_UNKNOWN 0
#define Array_Race_HUMAN 1
#define Array_Race_BARBARIAN 2
#define Array_Race_ERUDITE 3
#define Array_Race_WOOD_ELF 4
#define Array_Race_HIGH_ELF 5
#define Array_Race_DARK_ELF 6
#define Array_Race_HALF_ELF 7
#define Array_Race_DWARF 8
#define Array_Race_TROLL 9
#define Array_Race_OGRE 10
#define Array_Race_HALFLING 11
#define Array_Race_GNOME 12
#define Array_Race_IKSAR 13
#define Array_Race_VAHSHIR 14
#define Array_Race_FROGLOK 15
#define Array_Race_DRAKKIN 16
#define Array_Race_NPC 17
#define Array_Race_PET 18
#define Count_Array_Race 19 // used for array defines, must be the max + 1
#define PLAYER_RACE_COUNT 16 // The count of all player races
#define PLAYER_RACE_EMU_NPC 17
#define PLAYER_RACE_EMU_PET 18
#define PLAYER_RACE_EMU_COUNT 19
// player race bits
#define PLAYER_RACE_UNKNOWN_BIT 0
#define PLAYER_RACE_HUMAN_BIT 1
#define PLAYER_RACE_BARBARIAN_BIT 2
#define PLAYER_RACE_ERUDITE_BIT 4
#define PLAYER_RACE_WOOD_ELF_BIT 8
#define PLAYER_RACE_HIGH_ELF_BIT 16
#define PLAYER_RACE_DARK_ELF_BIT 32
#define PLAYER_RACE_HALF_ELF_BIT 64
#define PLAYER_RACE_DWARF_BIT 128
#define PLAYER_RACE_TROLL_BIT 256
#define PLAYER_RACE_OGRE_BIT 512
#define PLAYER_RACE_HALFLING_BIT 1024
#define PLAYER_RACE_GNOME_BIT 2048
#define PLAYER_RACE_IKSAR_BIT 4096
#define PLAYER_RACE_VAHSHIR_BIT 8192
#define PLAYER_RACE_FROGLOK_BIT 16384
#define PLAYER_RACE_DRAKKIN_BIT 32768
#define PLAYER_RACE_ALL_MASK 65535
const char* GetRaceIDName(uint16 race_id);
const char* GetPlayerRaceName(uint32 player_race_value);
uint32 GetPlayerRaceValue(uint16 race_id);
uint32 GetPlayerRaceBit(uint16 race_id);
uint16 GetRaceIDFromPlayerRaceValue(uint32 player_race_value);
uint16 GetRaceIDFromPlayerRaceBit(uint32 player_race_bit);
// player race-/gender-based model feature validators
namespace PlayerAppearance
{
bool IsValidBeard(uint16 race_id, uint8 gender_id, uint8 beard_value, bool use_luclin = true);
bool IsValidBeardColor(uint16 race_id, uint8 gender_id, uint8 beard_color_value, bool use_luclin = true);
bool IsValidDetail(uint16 race_id, uint8 gender_id, uint32 detail_value, bool use_luclin = true);
bool IsValidEyeColor(uint16 race_id, uint8 gender_id, uint8 eye_color_value, bool use_luclin = true);
bool IsValidFace(uint16 race_id, uint8 gender_id, uint8 face_value, bool use_luclin = true);
bool IsValidHair(uint16 race_id, uint8 gender_id, uint8 hair_value, bool use_luclin = true);
bool IsValidHairColor(uint16 race_id, uint8 gender_id, uint8 hair_color_value, bool use_luclin = true);
bool IsValidHead(uint16 race_id, uint8 gender_id, uint8 head_value, bool use_luclin = true);
bool IsValidHeritage(uint16 race_id, uint8 gender_id, uint32 heritage_value, bool use_luclin = true);
bool IsValidTattoo(uint16 race_id, uint8 gender_id, uint32 tattoo_value, bool use_luclin = true);
bool IsValidTexture(uint16 race_id, uint8 gender_id, uint8 texture_value, bool use_luclin = true);
bool IsValidWoad(uint16 race_id, uint8 gender_id, uint8 woad_value, bool use_luclin = true);
}
/*
+19
View File
@@ -1,5 +1,20 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.org)
This program 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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef RULE_CATEGORY
#define RULE_CATEGORY(name)
@@ -516,10 +531,14 @@ RULE_CATEGORY_END()
#ifdef BOTS
RULE_CATEGORY(Bots)
RULE_INT(Bots, AAExpansion, 8) // Bots get AAs through this expansion
RULE_INT(Bots, CommandSpellRank, 1) // Filters bot command spells by rank (1, 2 and 3 are valid filters - any other number allows all ranks)
RULE_INT(Bots, CreationLimit, 150) // Number of bots that each account can create
RULE_BOOL(Bots, FinishBuffing, false) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.
RULE_BOOL(Bots, GroupBuffing, false) // Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.
RULE_INT(Bots, HealRotationMaxMembers, 24) // Maximum number of heal rotation members
RULE_INT(Bots, HealRotationMaxTargets, 12) // Maximum number of heal rotation targets
RULE_REAL(Bots, ManaRegen, 2.0) // Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.
RULE_BOOL(Bots, PreferNoManaCommandSpells, true) // Give sorting priority to newer no-mana spells (i.e., 'Bind Affinity')
RULE_BOOL(Bots, QuestableSpawnLimit, false) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl
RULE_BOOL(Bots, QuestableSpells, false) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests.
RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid
+19 -19
View File
@@ -1,3 +1,21 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.org)
This program 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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <iostream>
#include <cstring>
@@ -1647,6 +1665,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].short_buff_box = atoi(row[154]);
sp[tempid].descnum = atoi(row[155]);
sp[tempid].typedescnum = atoi(row[156]);
sp[tempid].effectdescnum = atoi(row[157]);
sp[tempid].npc_no_los = atoi(row[159]) != 0;
@@ -2025,22 +2044,3 @@ void SharedDatabase::SaveCharacterInspectMessage(uint32 character_id, const Insp
std::string query = StringFormat("REPLACE INTO `character_inspect_messages` (id, inspect_message) VALUES (%u, '%s')", character_id, EscapeString(message->text).c_str());
auto results = QueryDatabase(query);
}
#ifdef BOTS
void SharedDatabase::GetBotInspectMessage(uint32 bot_id, InspectMessage_Struct* message)
{
std::string query = StringFormat("SELECT `inspect_message` FROM `bot_inspect_messages` WHERE `bot_id` = %i LIMIT 1", bot_id);
auto results = QueryDatabase(query);
auto row = results.begin();
memset(message, '\0', sizeof(InspectMessage_Struct));
for (auto row = results.begin(); row != results.end(); ++row) {
memcpy(message, row[0], sizeof(InspectMessage_Struct));
}
}
void SharedDatabase::SetBotInspectMessage(uint32 bot_id, const InspectMessage_Struct* message)
{
std::string query = StringFormat("REPLACE INTO `bot_inspect_messages` (bot_id, inspect_message) VALUES (%u, '%s')", bot_id, EscapeString(message->text).c_str());
auto results = QueryDatabase(query);
}
#endif
+18 -5
View File
@@ -1,3 +1,21 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.org)
This program 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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef SHAREDDB_H_
#define SHAREDDB_H_
@@ -126,11 +144,6 @@ class SharedDatabase : public Database
void LoadBaseData(void *data, int max_level);
const BaseDataStruct* GetBaseData(int lvl, int cl);
#ifdef BOTS
void GetBotInspectMessage(uint32 botid, InspectMessage_Struct* message);
void SetBotInspectMessage(uint32 botid, const InspectMessage_Struct* message);
#endif
protected:
std::unique_ptr<EQEmu::MemoryMappedFile> skill_caps_mmf;
+3 -3
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2005 EQEMu Development Team (http://eqemulator.net)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -639,7 +639,7 @@ typedef enum {
// number. note that the id field is counted as 0, this way the numbers
// here match the numbers given to sep in the loading function net.cpp
//
#define SPELL_LOAD_FIELD_COUNT 231
#define SPELL_LOAD_FIELD_COUNT 236
struct SPDat_Spell_Struct
{
@@ -707,7 +707,7 @@ struct SPDat_Spell_Struct
// 152 & 153: all set to 0
/* 154 */ int8 short_buff_box; // != 0, goes to short buff box.
/* 155 */ int descnum; // eqstr of description of spell
/* 156 */ //int typedescnum; // eqstr of type description
/* 156 */ int typedescnum; // eqstr of type description
/* 157 */ int effectdescnum; // eqstr of effect description
/* 158 */ //Category Desc ID 3
/* 159 */ bool npc_no_los;
+2 -2
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2013 EQEMu Development Team (http://eqemulator.net)
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
#define CURRENT_BINARY_DATABASE_VERSION 9096
#ifdef BOTS
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9000
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9002
#else
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
#endif