mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 08:42:25 +00:00
Revert "Added bot commands"
This reverts commit 3ec500244e558325f4af28cd84feb183e069203b.
This commit is contained in:
parent
3ec500244e
commit
b2dd3df1e2
@ -1,11 +1,6 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 3/12/2019 ==
|
||||
KentaiVZ: Added two new bot commands to make use of the already present database fields.
|
||||
|
||||
- ^bottitle - Gives targeted bot a custom title ( I.E Pathfinder )
|
||||
- ^botsuffix - Gives targeted bot a custom suffix ( I.E of The Grand Creation )
|
||||
|
||||
|
||||
== 3/1/2019 ==
|
||||
Noudess: Major faction conversion to use client data.
|
||||
|
||||
|
||||
@ -3259,7 +3259,7 @@ bool Bot::Spawn(Client* botCharacterOwner) {
|
||||
else
|
||||
this->GetBotOwner()->CastToClient()->Message(13, "%s save failed!", this->GetCleanName());
|
||||
|
||||
// Spawn the bot at the bot owner's loc
|
||||
// Spawn the bot at the bow owner's loc
|
||||
this->m_Position.x = botCharacterOwner->GetX();
|
||||
this->m_Position.y = botCharacterOwner->GetY();
|
||||
this->m_Position.z = botCharacterOwner->GetZ();
|
||||
@ -3364,8 +3364,6 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
ns->spawn.helm = helmtexture; //(GetShowHelm() ? helmtexture : 0); //0xFF;
|
||||
ns->spawn.equip_chest2 = texture; //0xFF;
|
||||
ns->spawn.show_name = true;
|
||||
strcpy(ns->spawn.title, GetTitle().c_str());
|
||||
strcpy(ns->spawn.suffix, GetSuffix().c_str());
|
||||
const EQEmu::ItemData* item = nullptr;
|
||||
const EQEmu::ItemInstance* inst = nullptr;
|
||||
uint32 spawnedbotid = 0;
|
||||
|
||||
@ -272,11 +272,6 @@ public:
|
||||
bool HasOrMayGetAggro();
|
||||
void SetDefaultBotStance();
|
||||
|
||||
void setTitle(std::string bot_title) { title = bot_title; }
|
||||
void setSuffix(std::string bot_suffix) { suffix = bot_suffix; }
|
||||
std::string GetTitle() { return title; }
|
||||
std::string GetSuffix() { return suffix; }
|
||||
|
||||
inline virtual int32 GetMaxStat();
|
||||
inline virtual int32 GetMaxResist();
|
||||
inline virtual int32 GetMaxSTR();
|
||||
@ -656,8 +651,6 @@ private:
|
||||
uint32 _guildId;
|
||||
uint8 _guildRank;
|
||||
std::string _guildName;
|
||||
std::string title;
|
||||
std::string suffix;
|
||||
uint32 _lastZoneId;
|
||||
bool _rangerAutoWeaponSelect;
|
||||
BotRoleType _botRole;
|
||||
|
||||
@ -1352,8 +1352,6 @@ int bot_command_init(void)
|
||||
bot_command_add("botstopmeleelevel", "Sets the level a caster or spell-casting fighter bot will stop melee combat", 0, bot_subcommand_bot_stop_melee_level) ||
|
||||
bot_command_add("botsummon", "Summons bot(s) to your location", 0, bot_subcommand_bot_summon) ||
|
||||
bot_command_add("bottattoo", "Changes the Drakkin tattoo of a bot", 0, bot_subcommand_bot_tattoo) ||
|
||||
bot_command_add("bottitle", "For changing the bot title", 0, bot_subcommand_bot_title) ||
|
||||
bot_command_add("botsuffix", "For changing the bot suffix", 0, bot_subcommand_bot_suffix) ||
|
||||
bot_command_add("bottogglearcher", "Toggles a archer bot between melee and ranged weapon use", 0, bot_subcommand_bot_toggle_archer) ||
|
||||
bot_command_add("bottogglehelm", "Toggles the helm visibility of a bot between shown and hidden", 0, bot_subcommand_bot_toggle_helm) ||
|
||||
bot_command_add("botupdate", "Updates a bot to reflect any level changes that you have experienced", 0, bot_subcommand_bot_update) ||
|
||||
@ -5542,68 +5540,6 @@ void bot_subcommand_bot_update(Client *c, const Seperator *sep)
|
||||
c->Message(m_action, "Updated %i of your %i spawned bots", bot_count, sbl.size());
|
||||
}
|
||||
|
||||
void bot_subcommand_bot_title(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->arg[1][0] == '\0' || sep->IsNumber(1)) {
|
||||
c->Message(m_fail, "You must specify a [title] to use this command");
|
||||
return;
|
||||
}
|
||||
auto my_bot = ActionableBots::AsTarget_ByBot(c);
|
||||
if (!my_bot) {
|
||||
c->Message(m_fail, "You must <target> a bot that you own to use this command");
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen(sep->arg[1]) > 31) {
|
||||
c->Message(13, "Title must be 31 characters or less.");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string bot_title = sep->arg[1];
|
||||
|
||||
my_bot->setTitle(bot_title);
|
||||
if (!botdb.SaveBot(my_bot)) {
|
||||
c->Message(m_fail, BotDatabase::fail::SaveBot());
|
||||
return;
|
||||
}
|
||||
else {
|
||||
my_bot->CastToClient()->SetAATitle(bot_title.c_str());
|
||||
c->Message(m_action, "Bot Saved.");
|
||||
}
|
||||
}
|
||||
|
||||
void bot_subcommand_bot_suffix(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->arg[1][0] == '\0' || sep->IsNumber(1)) {
|
||||
c->Message(m_fail, "You must specify a [suffix] to use this command (use underscores for any spaces)");
|
||||
return;
|
||||
}
|
||||
auto my_bot = ActionableBots::AsTarget_ByBot(c);
|
||||
if (!my_bot) {
|
||||
c->Message(m_fail, "You must <target> a bot that you own to use this command");
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen(sep->arg[1]) > 31) {
|
||||
c->Message(13, "Suffix must be 31 characters or less.");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string bot_suffix = sep->arg[1];
|
||||
std::replace(bot_suffix.begin(), bot_suffix.end(), '_', ' ');
|
||||
bot_suffix = bot_suffix.substr(0, 31);
|
||||
my_bot->setSuffix(bot_suffix);
|
||||
|
||||
if (!botdb.SaveBot(my_bot)) {
|
||||
c->Message(m_fail, BotDatabase::fail::SaveBot());
|
||||
return;
|
||||
}
|
||||
else {
|
||||
my_bot->CastToClient()->SetTitleSuffix(bot_suffix.c_str());
|
||||
c->Message(m_action, "Bot Saved.");
|
||||
}
|
||||
}
|
||||
|
||||
void bot_subcommand_bot_woad(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (helper_command_alias_fail(c, "bot_subcommand_bot_woad", sep->arg[0], "botwoad"))
|
||||
|
||||
@ -593,8 +593,6 @@ void bot_command_water_breathing(Client *c, const Seperator *sep);
|
||||
|
||||
// bot subcommands
|
||||
void bot_subcommand_bot_appearance(Client *c, const Seperator *sep);
|
||||
void bot_subcommand_bot_title(Client *c, const Seperator *sep);
|
||||
void bot_subcommand_bot_suffix(Client *c, const Seperator *sep);
|
||||
void bot_subcommand_bot_beard_color(Client *c, const Seperator *sep);
|
||||
void bot_subcommand_bot_beard_style(Client *c, const Seperator *sep);
|
||||
void bot_subcommand_bot_camp(Client *c, const Seperator *sep);
|
||||
|
||||
@ -395,8 +395,7 @@ bool BotDatabase::LoadBot(const uint32 bot_id, Bot*& loaded_bot)
|
||||
loaded_bot = new Bot(bot_id, atoi(row[0]), atoi(row[1]), atof(row[14]), atoi(row[6]), tempNPCStruct);
|
||||
if (loaded_bot) {
|
||||
loaded_bot->SetShowHelm((atoi(row[43]) > 0 ? true : false));
|
||||
loaded_bot->setTitle(row[4]);
|
||||
loaded_bot->setSuffix(row[5]);
|
||||
|
||||
uint32 bfd = atoi(row[44]);
|
||||
if (bfd < 1)
|
||||
bfd = 1;
|
||||
@ -605,9 +604,7 @@ bool BotDatabase::SaveBot(Bot* bot_inst)
|
||||
" `corruption` = '%i',"
|
||||
" `show_helm` = '%i',"
|
||||
" `follow_distance` = '%i',"
|
||||
" `stop_melee_level` = '%u',"
|
||||
" `title` = '%s',"
|
||||
" `suffix` = '%s'"
|
||||
" `stop_melee_level` = '%u'"
|
||||
" WHERE `bot_id` = '%u'",
|
||||
bot_inst->GetBotOwnerCharacterID(),
|
||||
bot_inst->GetBotSpellID(),
|
||||
@ -650,8 +647,6 @@ bool BotDatabase::SaveBot(Bot* bot_inst)
|
||||
((bot_inst->GetShowHelm()) ? (1) : (0)),
|
||||
bot_inst->GetFollowDistance(),
|
||||
bot_inst->GetStopMeleeLevel(),
|
||||
bot_inst->GetTitle().c_str(),
|
||||
bot_inst->GetSuffix().c_str(),
|
||||
bot_inst->GetBotID()
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user