mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-23 02:22:31 +00:00
More bot changes.
- Added #bot showhelm [on|off] - Allows you to disable your bot's helmet showing up
This commit is contained in:
parent
0dcf34d62b
commit
6ffe7a9563
35
zone/bot.cpp
35
zone/bot.cpp
@ -67,6 +67,7 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm
|
|||||||
SetHealRotationTimer(0);
|
SetHealRotationTimer(0);
|
||||||
SetNumHealRotationMembers(0);
|
SetNumHealRotationMembers(0);
|
||||||
SetBardUseOutOfCombatSongs(GetClass() == BARD);
|
SetBardUseOutOfCombatSongs(GetClass() == BARD);
|
||||||
|
SetShowHelm(true);
|
||||||
CalcChanceToCast();
|
CalcChanceToCast();
|
||||||
rest_timer.Disable();
|
rest_timer.Disable();
|
||||||
|
|
||||||
@ -4126,7 +4127,7 @@ void Bot::Spawn(Client* botCharacterOwner, std::string* errorMessage) {
|
|||||||
uint8 materialFromSlot = 0xFF;
|
uint8 materialFromSlot = 0xFF;
|
||||||
for(int i = EmuConstants::EQUIPMENT_BEGIN; i <= EmuConstants::EQUIPMENT_END; ++i) {
|
for(int i = EmuConstants::EQUIPMENT_BEGIN; i <= EmuConstants::EQUIPMENT_END; ++i) {
|
||||||
itemID = GetBotItemBySlot(i);
|
itemID = GetBotItemBySlot(i);
|
||||||
if(itemID != 0) {
|
if(itemID != 0) {
|
||||||
materialFromSlot = Inventory::CalcMaterialFromSlot(i);
|
materialFromSlot = Inventory::CalcMaterialFromSlot(i);
|
||||||
if(materialFromSlot != 0xFF)
|
if(materialFromSlot != 0xFF)
|
||||||
this->SendWearChange(materialFromSlot);
|
this->SendWearChange(materialFromSlot);
|
||||||
@ -4359,7 +4360,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
|||||||
ns->spawn.is_npc = 0; // 0=no, 1=yes
|
ns->spawn.is_npc = 0; // 0=no, 1=yes
|
||||||
ns->spawn.is_pet = 0;
|
ns->spawn.is_pet = 0;
|
||||||
ns->spawn.guildrank = 0;
|
ns->spawn.guildrank = 0;
|
||||||
ns->spawn.showhelm = 1;
|
ns->spawn.showhelm = GetShowHelm();
|
||||||
ns->spawn.flymode = 0;
|
ns->spawn.flymode = 0;
|
||||||
ns->spawn.size = 0;
|
ns->spawn.size = 0;
|
||||||
ns->spawn.NPC = 0; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
ns->spawn.NPC = 0; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
||||||
@ -4367,7 +4368,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
|||||||
UpdateActiveLight();
|
UpdateActiveLight();
|
||||||
ns->spawn.light = m_Light.Type.Active;
|
ns->spawn.light = m_Light.Type.Active;
|
||||||
|
|
||||||
ns->spawn.helm = helmtexture; //0xFF;
|
ns->spawn.helm = (GetShowHelm() ? helmtexture : 0); //0xFF;
|
||||||
ns->spawn.equip_chest2 = texture; //0xFF;
|
ns->spawn.equip_chest2 = texture; //0xFF;
|
||||||
|
|
||||||
const Item_Struct* item = 0;
|
const Item_Struct* item = 0;
|
||||||
@ -11428,7 +11429,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
|||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < 7; i++) {
|
for (int i = 0; i < 7; i++) {
|
||||||
uint8 slotmaterial = Inventory::CalcMaterialFromSlot((uint8)slots[i]);
|
uint8 slotmaterial = Inventory::CalcMaterialFromSlot((uint8)slots[i]);
|
||||||
c->GetTarget()->CastToBot()->SendWearChange(slotmaterial);
|
c->GetTarget()->CastToBot()->SendWearChange(slotmaterial);
|
||||||
}
|
}
|
||||||
@ -15616,6 +15617,32 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!strcasecmp(sep->arg[1], "showhelm")) {
|
||||||
|
bool showhelm = true;
|
||||||
|
if (sep->arg[2]) {
|
||||||
|
if (!strcasecmp(sep->arg[2], "on"))
|
||||||
|
showhelm = true;
|
||||||
|
else if (!strcasecmp(sep->arg[2], "off"))
|
||||||
|
showhelm = false;
|
||||||
|
else {
|
||||||
|
c->Message(0, "Usage #bot showhelm [on|off]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Mob *target = c->GetTarget();
|
||||||
|
if (target && target->IsBot() && (c == target->GetOwner()->CastToClient())) {
|
||||||
|
Bot* b = target->CastToBot();
|
||||||
|
if (b) {
|
||||||
|
b->SetShowHelm(showhelm);
|
||||||
|
c->Message(0, "Your bot will %s show their helmet.", (showhelm ? "now" : "no longer"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
c->Message(0, "Usage #bot showhelm [on|off]");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// franck: EQoffline
|
// franck: EQoffline
|
||||||
|
|||||||
@ -467,6 +467,7 @@ public:
|
|||||||
uint32 GetHealRotationNextHealTime() { return _healRotationNextHeal; }
|
uint32 GetHealRotationNextHealTime() { return _healRotationNextHeal; }
|
||||||
uint32 GetHealRotationTimer () { return _healRotationTimer; }
|
uint32 GetHealRotationTimer () { return _healRotationTimer; }
|
||||||
bool GetBardUseOutOfCombatSongs() { return _bardUseOutOfCombatSongs;}
|
bool GetBardUseOutOfCombatSongs() { return _bardUseOutOfCombatSongs;}
|
||||||
|
bool GetShowHelm() { return _showhelm; }
|
||||||
inline virtual int32 GetAC() const { return AC; }
|
inline virtual int32 GetAC() const { return AC; }
|
||||||
inline virtual int32 GetSTR() const { return STR; }
|
inline virtual int32 GetSTR() const { return STR; }
|
||||||
inline virtual int32 GetSTA() const { return STA; }
|
inline virtual int32 GetSTA() const { return STA; }
|
||||||
@ -550,6 +551,7 @@ public:
|
|||||||
void SetHealRotationTimer( uint32 timer ) { _healRotationTimer = timer; }
|
void SetHealRotationTimer( uint32 timer ) { _healRotationTimer = timer; }
|
||||||
void SetNumHealRotationMembers( uint8 numMembers ) { _numHealRotationMembers = numMembers; }
|
void SetNumHealRotationMembers( uint8 numMembers ) { _numHealRotationMembers = numMembers; }
|
||||||
void SetBardUseOutOfCombatSongs(bool useOutOfCombatSongs) { _bardUseOutOfCombatSongs = useOutOfCombatSongs;}
|
void SetBardUseOutOfCombatSongs(bool useOutOfCombatSongs) { _bardUseOutOfCombatSongs = useOutOfCombatSongs;}
|
||||||
|
void SetShowHelm(bool showhelm) { _showhelm = showhelm; }
|
||||||
|
|
||||||
// Class Destructors
|
// Class Destructors
|
||||||
virtual ~Bot();
|
virtual ~Bot();
|
||||||
@ -622,6 +624,7 @@ private:
|
|||||||
std::map<uint32, BotAA> botAAs;
|
std::map<uint32, BotAA> botAAs;
|
||||||
InspectMessage_Struct _botInspectMessage;
|
InspectMessage_Struct _botInspectMessage;
|
||||||
bool _bardUseOutOfCombatSongs;
|
bool _bardUseOutOfCombatSongs;
|
||||||
|
bool _showhelm;
|
||||||
|
|
||||||
// Private "base stats" Members
|
// Private "base stats" Members
|
||||||
int32 _baseMR;
|
int32 _baseMR;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user