mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Fix bots build
This commit is contained in:
parent
11a43cd320
commit
2c8ed1074a
26
zone/bot.cpp
26
zone/bot.cpp
@ -89,7 +89,7 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm
|
||||
GenerateAppearance();
|
||||
GenerateBaseStats();
|
||||
// Calculate HitPoints Last As It Uses Base Stats
|
||||
cur_hp = GenerateBaseHitPoints();
|
||||
current_hp = GenerateBaseHitPoints();
|
||||
current_mana = GenerateBaseManaPoints();
|
||||
cur_end = CalcBaseEndurance();
|
||||
hp_regen = CalcHPRegen();
|
||||
@ -137,7 +137,7 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
|
||||
_baseATK = npcTypeData.ATK;
|
||||
_baseRace = npcTypeData.race;
|
||||
_baseGender = npcTypeData.gender;
|
||||
cur_hp = npcTypeData.cur_hp;
|
||||
current_hp = npcTypeData.current_hp;
|
||||
current_mana = npcTypeData.Mana;
|
||||
RestRegenHP = 0;
|
||||
RestRegenMana = 0;
|
||||
@ -209,10 +209,10 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
|
||||
hp_regen = CalcHPRegen();
|
||||
mana_regen = CalcManaRegen();
|
||||
end_regen = CalcEnduranceRegen();
|
||||
if(cur_hp > max_hp)
|
||||
cur_hp = max_hp;
|
||||
if(current_hp > max_hp)
|
||||
current_hp = max_hp;
|
||||
|
||||
if(cur_hp <= 0) {
|
||||
if(current_hp <= 0) {
|
||||
SetHP(max_hp/5);
|
||||
SetMana(0);
|
||||
BuffFadeAll();
|
||||
@ -336,7 +336,7 @@ NPCType Bot::FillNPCTypeStruct(uint32 botSpellsID, std::string botName, std::str
|
||||
BotNPCType.drakkin_heritage = drakkinHeritage;
|
||||
BotNPCType.drakkin_tattoo = drakkinTattoo;
|
||||
BotNPCType.drakkin_details = drakkinDetails;
|
||||
BotNPCType.cur_hp = hp;
|
||||
BotNPCType.current_hp = hp;
|
||||
BotNPCType.Mana = mana;
|
||||
BotNPCType.MR = mr;
|
||||
BotNPCType.CR = cr;
|
||||
@ -386,7 +386,7 @@ NPCType Bot::CreateDefaultNPCTypeStructForBot(std::string botName, std::string b
|
||||
Result.maxlevel = botLevel;
|
||||
Result.size = 6.0;
|
||||
Result.npc_id = 0;
|
||||
Result.cur_hp = 0;
|
||||
Result.current_hp = 0;
|
||||
Result.drakkin_details = 0;
|
||||
Result.drakkin_heritage = 0;
|
||||
Result.drakkin_tattoo = 0;
|
||||
@ -5147,7 +5147,7 @@ int Bot::GetHandToHandDamage(void) {
|
||||
// everyone uses this in the revamp!
|
||||
int skill = GetSkill(EQEmu::skills::SkillHandtoHand);
|
||||
int epic = 0;
|
||||
if (CastToNPC()->GetEquipment(EQEmu::textures::armorHands) == 10652 && GetLevel() > 46)
|
||||
if (CastToNPC()->GetEquippedItemFromTextureSlot(EQEmu::textures::armorHands) == 10652 && GetLevel() > 46)
|
||||
epic = 280;
|
||||
if (epic > skill)
|
||||
skill = epic;
|
||||
@ -5169,7 +5169,7 @@ int Bot::GetHandToHandDamage(void) {
|
||||
9, 9, 9, 9, 9, 10, 10, 10, 10, 10, // 31-40
|
||||
10, 11, 11, 11, 11, 11, 11, 12, 12}; // 41-49
|
||||
if (GetClass() == MONK) {
|
||||
if (CastToNPC()->GetEquipment(EQEmu::textures::armorHands) == 10652 && GetLevel() > 50)
|
||||
if (CastToNPC()->GetEquippedItemFromTextureSlot(EQEmu::textures::armorHands) == 10652 && GetLevel() > 50)
|
||||
return 9;
|
||||
if (level > 62)
|
||||
return 15;
|
||||
@ -7159,14 +7159,14 @@ int32 Bot::CalcMaxHP() {
|
||||
bot_hp += GroupLeadershipAAHealthEnhancement();
|
||||
bot_hp += (bot_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f));
|
||||
max_hp = bot_hp;
|
||||
if (cur_hp > max_hp)
|
||||
cur_hp = max_hp;
|
||||
if (current_hp > max_hp)
|
||||
current_hp = max_hp;
|
||||
|
||||
int hp_perc_cap = spellbonuses.HPPercCap[0];
|
||||
if(hp_perc_cap) {
|
||||
int curHP_cap = ((max_hp * hp_perc_cap) / 100);
|
||||
if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1]))
|
||||
cur_hp = curHP_cap;
|
||||
if (current_hp > curHP_cap || (spellbonuses.HPPercCap[1] && current_hp > spellbonuses.HPPercCap[1]))
|
||||
current_hp = curHP_cap;
|
||||
}
|
||||
return max_hp;
|
||||
}
|
||||
|
||||
@ -2887,7 +2887,7 @@ int32 Client::GetEquipmentMaterial(uint8 material_slot)
|
||||
{
|
||||
const ItemData *item;
|
||||
|
||||
item = database.GetItem(GetEquipment(material_slot));
|
||||
item = database.GetItem(GetEquippedItemFromTextureSlot(material_slot));
|
||||
if(item != 0)
|
||||
{
|
||||
return item->Material;
|
||||
|
||||
@ -28,6 +28,10 @@
|
||||
#include "quest_parser_collection.h"
|
||||
#include "zonedb.h"
|
||||
|
||||
#ifdef BOTS
|
||||
#include "bot.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Stores internal representation of mob texture by material slot
|
||||
*
|
||||
|
||||
@ -1058,7 +1058,7 @@ NPC * NPC::SpawnNodeNPC(std::string name, std::string last_name, const glm::vec4
|
||||
sprintf(npc_type->name, "%s", name.c_str());
|
||||
sprintf(npc_type->lastname, "%s", last_name.c_str());
|
||||
|
||||
npc_type->current_hp = 4000000;
|
||||
npc_type->current_hp = 4000000;
|
||||
npc_type->max_hp = 4000000;
|
||||
npc_type->race = 2254;
|
||||
npc_type->gender = 2;
|
||||
|
||||
@ -624,7 +624,7 @@ XS(XS_Mob_GetEquipment); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_GetEquipment) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetEquipment(THIS, uint8 material_slot)");
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetEquippedItemFromTextureSlot(THIS, uint8 material_slot)");
|
||||
{
|
||||
Mob *THIS;
|
||||
int32 RETVAL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user