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