mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Moved struct Item_Struct into namespace EQEmu
This commit is contained in:
+70
-78
@@ -233,9 +233,9 @@ uint32 Bot::GetBotArcheryRange() {
|
||||
if (!range_inst || !ammo_inst)
|
||||
return 0;
|
||||
|
||||
const Item_Struct *range_item = range_inst->GetItem();
|
||||
const Item_Struct *ammo_item = ammo_inst->GetItem();
|
||||
if (!range_item || !ammo_item || range_item->ItemType != ItemTypeBow || ammo_item->ItemType != ItemTypeArrow)
|
||||
const EQEmu::Item_Struct *range_item = range_inst->GetItem();
|
||||
const EQEmu::Item_Struct *ammo_item = ammo_inst->GetItem();
|
||||
if (!range_item || !ammo_item || range_item->ItemType != EQEmu::item::ItemTypeBow || ammo_item->ItemType != EQEmu::item::ItemTypeArrow)
|
||||
return 0;
|
||||
|
||||
// everything is good!
|
||||
@@ -1180,38 +1180,30 @@ uint16 Bot::GetPrimarySkillValue() {
|
||||
else {
|
||||
uint8 type = m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->ItemType; //is this the best way to do this?
|
||||
switch(type) {
|
||||
case ItemType1HSlash: {
|
||||
skill = Skill1HSlashing;
|
||||
break;
|
||||
}
|
||||
case ItemType2HSlash: {
|
||||
skill = Skill2HSlashing;
|
||||
break;
|
||||
}
|
||||
case ItemType1HPiercing: {
|
||||
skill = Skill1HPiercing;
|
||||
break;
|
||||
}
|
||||
case ItemType1HBlunt: {
|
||||
skill = Skill1HBlunt;
|
||||
break;
|
||||
}
|
||||
case ItemType2HBlunt: {
|
||||
skill = Skill2HBlunt;
|
||||
break;
|
||||
}
|
||||
case ItemType2HPiercing: {
|
||||
skill = Skill2HPiercing;
|
||||
break;
|
||||
}
|
||||
case ItemTypeMartial: {
|
||||
skill = SkillHandtoHand;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
skill = SkillHandtoHand;
|
||||
break;
|
||||
}
|
||||
case EQEmu::item::ItemType1HSlash:
|
||||
skill = Skill1HSlashing;
|
||||
break;
|
||||
case EQEmu::item::ItemType2HSlash:
|
||||
skill = Skill2HSlashing;
|
||||
break;
|
||||
case EQEmu::item::ItemType1HPiercing:
|
||||
skill = Skill1HPiercing;
|
||||
break;
|
||||
case EQEmu::item::ItemType1HBlunt:
|
||||
skill = Skill1HBlunt;
|
||||
break;
|
||||
case EQEmu::item::ItemType2HBlunt:
|
||||
skill = Skill2HBlunt;
|
||||
break;
|
||||
case EQEmu::item::ItemType2HPiercing:
|
||||
skill = Skill2HPiercing;
|
||||
break;
|
||||
case EQEmu::item::ItemTypeMartial:
|
||||
skill = SkillHandtoHand;
|
||||
break;
|
||||
default:
|
||||
skill = SkillHandtoHand;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1906,12 +1898,12 @@ void Bot::BotRangedAttack(Mob* other) {
|
||||
}
|
||||
|
||||
ItemInst* rangedItem = GetBotItem(EQEmu::legacy::SlotRange);
|
||||
const Item_Struct* RangeWeapon = 0;
|
||||
const EQEmu::Item_Struct* RangeWeapon = 0;
|
||||
if(rangedItem)
|
||||
RangeWeapon = rangedItem->GetItem();
|
||||
|
||||
ItemInst* ammoItem = GetBotItem(EQEmu::legacy::SlotAmmo);
|
||||
const Item_Struct* Ammo = 0;
|
||||
const EQEmu::Item_Struct* Ammo = 0;
|
||||
if(ammoItem)
|
||||
Ammo = ammoItem->GetItem();
|
||||
|
||||
@@ -2020,7 +2012,7 @@ void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillUseTypes
|
||||
int32 min_hit = 1;
|
||||
int32 max_hit = ((2 * weapon_damage * GetDamageTable(skillinuse)) / 100);
|
||||
if(GetLevel() >= 28 && IsWarriorClass()) {
|
||||
int ucDamageBonus = GetWeaponDamageBonus((const Item_Struct*) nullptr);
|
||||
int ucDamageBonus = GetWeaponDamageBonus((const EQEmu::Item_Struct*) nullptr);
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
hate += ucDamageBonus;
|
||||
@@ -2062,12 +2054,12 @@ void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillUseTypes
|
||||
|
||||
if(skillinuse == SkillBash){
|
||||
const ItemInst* inst = GetBotItem(EQEmu::legacy::SlotSecondary);
|
||||
const Item_Struct* botweapon = 0;
|
||||
const EQEmu::Item_Struct* botweapon = 0;
|
||||
if(inst)
|
||||
botweapon = inst->GetItem();
|
||||
|
||||
if(botweapon) {
|
||||
if(botweapon->ItemType == ItemTypeShield)
|
||||
if (botweapon->ItemType == EQEmu::item::ItemTypeShield)
|
||||
hate += botweapon->AC;
|
||||
|
||||
hate = (hate * (100 + GetFuriousBash(botweapon->Focus.Effect)) / 100);
|
||||
@@ -2122,7 +2114,7 @@ void Bot::ApplySpecialAttackMod(SkillUseTypes skill, int32 &dmg, int32 &mindmg)
|
||||
|
||||
if (item_slot >= EQEmu::legacy::EQUIPMENT_BEGIN){
|
||||
const ItemInst* inst = GetBotItem(item_slot);
|
||||
const Item_Struct* botweapon = 0;
|
||||
const EQEmu::Item_Struct* botweapon = 0;
|
||||
if(inst)
|
||||
botweapon = inst->GetItem();
|
||||
|
||||
@@ -2487,7 +2479,7 @@ void Bot::AI_Process() {
|
||||
if (GetTarget() && ExtraAttackChanceBonus) {
|
||||
ItemInst *wpn = GetBotItem(EQEmu::legacy::SlotPrimary);
|
||||
if(wpn) {
|
||||
if(wpn->GetItem()->ItemType == ItemType2HSlash || wpn->GetItem()->ItemType == ItemType2HBlunt || wpn->GetItem()->ItemType == ItemType2HPiercing) {
|
||||
if (wpn->GetItem()->IsType2HWeapon()) {
|
||||
if(zone->random.Int(0, 100) < ExtraAttackChanceBonus)
|
||||
Attack(GetTarget(), EQEmu::legacy::SlotPrimary, false);
|
||||
}
|
||||
@@ -2510,7 +2502,7 @@ void Bot::AI_Process() {
|
||||
//now off hand
|
||||
if(GetTarget() && attack_dw_timer.Check() && CanThisClassDualWield()) {
|
||||
const ItemInst* instweapon = GetBotItem(EQEmu::legacy::SlotSecondary);
|
||||
const Item_Struct* weapon = 0;
|
||||
const EQEmu::Item_Struct* weapon = 0;
|
||||
//can only dual wield without a weapon if you're a monk
|
||||
if(instweapon || (botClass == MONK)) {
|
||||
if(instweapon)
|
||||
@@ -2523,7 +2515,7 @@ void Bot::AI_Process() {
|
||||
bIsFist = false;
|
||||
}
|
||||
|
||||
if(bIsFist || ((weapontype != ItemType2HSlash) && (weapontype != ItemType2HPiercing) && (weapontype != ItemType2HBlunt))) {
|
||||
if (bIsFist || !weapon->IsType2HWeapon()) {
|
||||
float DualWieldProbability = 0.0f;
|
||||
int32 Ambidexterity = (aabonuses.Ambidexterity + spellbonuses.Ambidexterity + itembonuses.Ambidexterity);
|
||||
DualWieldProbability = ((GetSkill(SkillDualWield) + GetLevel() + Ambidexterity) / 400.0f); // 78.0 max
|
||||
@@ -2957,7 +2949,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
ns->spawn.light = m_Light.Type[EQEmu::lightsource::LightActive];
|
||||
ns->spawn.helm = helmtexture; //(GetShowHelm() ? helmtexture : 0); //0xFF;
|
||||
ns->spawn.equip_chest2 = texture; //0xFF;
|
||||
const Item_Struct* item = 0;
|
||||
const EQEmu::Item_Struct* item = 0;
|
||||
const ItemInst* inst = 0;
|
||||
uint32 spawnedbotid = 0;
|
||||
spawnedbotid = this->GetBotID();
|
||||
@@ -3400,7 +3392,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
|
||||
//EQoffline: will give the items to the bots and change the bot stats
|
||||
if(inst && (GetBotOwner() == client->CastToMob()) && !IsEngaged()) {
|
||||
std::string TempErrorMessage;
|
||||
const Item_Struct* mWeaponItem = inst->GetItem();
|
||||
const EQEmu::Item_Struct* mWeaponItem = inst->GetItem();
|
||||
bool failedLoreCheck = false;
|
||||
for (int m = AUG_INDEX_BEGIN; m < EQEmu::legacy::ITEM_COMMON_SIZE; ++m) {
|
||||
ItemInst *itm = inst->GetAugment(m);
|
||||
@@ -3435,9 +3427,9 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
|
||||
how_many_slots++;
|
||||
if(!GetBotItem(j)) {
|
||||
if (j == EQEmu::legacy::SlotPrimary) {
|
||||
if((mWeaponItem->ItemType == ItemType2HSlash) || (mWeaponItem->ItemType == ItemType2HBlunt) || (mWeaponItem->ItemType == ItemType2HPiercing)) {
|
||||
if (mWeaponItem->IsType2HWeapon()) {
|
||||
if (GetBotItem(EQEmu::legacy::SlotSecondary)) {
|
||||
if(mWeaponItem && (mWeaponItem->ItemType == ItemType2HSlash) || (mWeaponItem->ItemType == ItemType2HBlunt) || (mWeaponItem->ItemType == ItemType2HPiercing)) {
|
||||
if (mWeaponItem && mWeaponItem->IsType2HWeapon()) {
|
||||
if (client->CheckLoreConflict(GetBotItem(EQEmu::legacy::SlotSecondary)->GetItem())) {
|
||||
failedLoreCheck = true;
|
||||
}
|
||||
@@ -3472,7 +3464,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
|
||||
if(success) {
|
||||
if (GetBotItem(EQEmu::legacy::SlotPrimary)) {
|
||||
ItemInst* remove_item = GetBotItem(EQEmu::legacy::SlotPrimary);
|
||||
if((remove_item->GetItem()->ItemType == ItemType2HSlash) || (remove_item->GetItem()->ItemType == ItemType2HBlunt) || (remove_item->GetItem()->ItemType == ItemType2HPiercing)) {
|
||||
if (remove_item->GetItem()->IsType2HWeapon()) {
|
||||
BotTradeSwapItem(client, EQEmu::legacy::SlotPrimary, 0, remove_item, remove_item->GetItem()->Slots, &TempErrorMessage, false);
|
||||
}
|
||||
}
|
||||
@@ -3509,7 +3501,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
|
||||
}
|
||||
if(!failedLoreCheck) {
|
||||
if (j == EQEmu::legacy::SlotPrimary) {
|
||||
if((mWeaponItem->ItemType == ItemType2HSlash) || (mWeaponItem->ItemType == ItemType2HBlunt) || (mWeaponItem->ItemType == ItemType2HPiercing)) {
|
||||
if (mWeaponItem->IsType2HWeapon()) {
|
||||
if (GetBotItem(EQEmu::legacy::SlotSecondary)) {
|
||||
if (client->CheckLoreConflict(GetBotItem(EQEmu::legacy::SlotSecondary)->GetItem())) {
|
||||
failedLoreCheck = true;
|
||||
@@ -3543,7 +3535,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
|
||||
}
|
||||
if (success && GetBotItem(EQEmu::legacy::SlotPrimary)) {
|
||||
ItemInst* remove_item = GetBotItem(EQEmu::legacy::SlotPrimary);
|
||||
if((remove_item->GetItem()->ItemType == ItemType2HSlash) || (remove_item->GetItem()->ItemType == ItemType2HBlunt) || (remove_item->GetItem()->ItemType == ItemType2HPiercing)) {
|
||||
if (remove_item->GetItem()->IsType2HWeapon()) {
|
||||
BotTradeSwapItem(client, EQEmu::legacy::SlotPrimary, 0, remove_item, remove_item->GetItem()->Slots, &TempErrorMessage, false);
|
||||
}
|
||||
}
|
||||
@@ -3579,7 +3571,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
|
||||
}
|
||||
}
|
||||
|
||||
const Item_Struct* item2 = 0;
|
||||
const EQEmu::Item_Struct* item2 = 0;
|
||||
for(int y = beginSlotID; y <= endSlotID; ++y) {
|
||||
item2 = database.GetItem(items[y]);
|
||||
if(item2) {
|
||||
@@ -3818,7 +3810,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
if (Hand == EQEmu::legacy::SlotPrimary && GetLevel() >= 28 && IsWarriorClass()) {
|
||||
// Damage bonuses apply only to hits from the main hand (Hand == MainPrimary) by characters level 28 and above
|
||||
// who belong to a melee class. If we're here, then all of these conditions apply.
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const Item_Struct*) nullptr);
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::Item_Struct*) nullptr);
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
hate += ucDamageBonus;
|
||||
@@ -3827,7 +3819,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
//Live AA - Sinister Strikes *Adds weapon damage bonus to offhand weapon.
|
||||
if (Hand == EQEmu::legacy::SlotSecondary) {
|
||||
if (aabonuses.SecondaryDmgInc || itembonuses.SecondaryDmgInc || spellbonuses.SecondaryDmgInc){
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const Item_Struct*) nullptr);
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::Item_Struct*) nullptr);
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
hate += ucDamageBonus;
|
||||
@@ -4285,8 +4277,8 @@ int32 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
|
||||
//Check if item focus effect exists for the client.
|
||||
if (itembonuses.FocusEffects[bottype]) {
|
||||
const Item_Struct* TempItem = 0;
|
||||
const Item_Struct* UsedItem = 0;
|
||||
const EQEmu::Item_Struct* TempItem = 0;
|
||||
const EQEmu::Item_Struct* UsedItem = 0;
|
||||
const ItemInst* TempInst = 0;
|
||||
uint16 UsedFocusID = 0;
|
||||
int32 Total = 0;
|
||||
@@ -4322,7 +4314,7 @@ int32 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
ItemInst *aug = nullptr;
|
||||
aug = ins->GetAugment(y);
|
||||
if(aug) {
|
||||
const Item_Struct* TempItemAug = aug->GetItem();
|
||||
const EQEmu::Item_Struct* TempItemAug = aug->GetItem();
|
||||
if (TempItemAug && TempItemAug->Focus.Effect > 0 && TempItemAug->Focus.Effect != SPELL_UNKNOWN) {
|
||||
if(rand_effectiveness) {
|
||||
focus_max = CalcBotFocusEffect(bottype, TempItemAug->Focus.Effect, spell_id, true);
|
||||
@@ -4870,12 +4862,12 @@ void Bot::DoSpecialAttackDamage(Mob *who, SkillUseTypes skill, int32 max_damage,
|
||||
|
||||
if(skill == SkillBash) {
|
||||
const ItemInst* inst = GetBotItem(EQEmu::legacy::SlotSecondary);
|
||||
const Item_Struct* botweapon = 0;
|
||||
const EQEmu::Item_Struct* botweapon = 0;
|
||||
if(inst)
|
||||
botweapon = inst->GetItem();
|
||||
|
||||
if(botweapon) {
|
||||
if(botweapon->ItemType == ItemTypeShield)
|
||||
if (botweapon->ItemType == EQEmu::item::ItemTypeShield)
|
||||
hate += botweapon->AC;
|
||||
|
||||
hate = (hate * (100 + GetFuriousBash(botweapon->Focus.Effect)) / 100);
|
||||
@@ -4935,11 +4927,11 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) {
|
||||
bool bIsBehind = false;
|
||||
bool bCanFrontalBS = false;
|
||||
const ItemInst* inst = GetBotItem(EQEmu::legacy::SlotPrimary);
|
||||
const Item_Struct* botpiercer = nullptr;
|
||||
const EQEmu::Item_Struct* botpiercer = nullptr;
|
||||
if(inst)
|
||||
botpiercer = inst->GetItem();
|
||||
|
||||
if(!botpiercer || (botpiercer->ItemType != ItemType1HPiercing)) {
|
||||
if (!botpiercer || (botpiercer->ItemType != EQEmu::item::ItemType1HPiercing)) {
|
||||
BotGroupSay(this, "I can't backstab with this weapon!");
|
||||
return;
|
||||
}
|
||||
@@ -5108,7 +5100,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|
||||
case WARRIOR:
|
||||
if(level >= RuleI(Combat, NPCBashKickLevel)){
|
||||
bool canBash = false;
|
||||
if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::legacy::SlotSecondary) && m_inv.GetItem(EQEmu::legacy::SlotSecondary)->GetItem()->ItemType == ItemTypeShield) || (m_inv.GetItem(EQEmu::legacy::SlotPrimary) && (m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->ItemType == ItemType2HSlash || m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->ItemType == ItemType2HBlunt || m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->ItemType == ItemType2HPiercing) && GetAA(aa2HandBash) >= 1))
|
||||
if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::legacy::SlotSecondary) && m_inv.GetItem(EQEmu::legacy::SlotSecondary)->GetItem()->ItemType == EQEmu::item::ItemTypeShield) || (m_inv.GetItem(EQEmu::legacy::SlotPrimary) && m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1))
|
||||
canBash = true;
|
||||
|
||||
if(!canBash || zone->random.Int(0, 100) > 25)
|
||||
@@ -5127,7 +5119,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|
||||
case SHADOWKNIGHT:
|
||||
case PALADIN:
|
||||
if(level >= RuleI(Combat, NPCBashKickLevel)){
|
||||
if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::legacy::SlotSecondary) && m_inv.GetItem(EQEmu::legacy::SlotSecondary)->GetItem()->ItemType == ItemTypeShield) || (m_inv.GetItem(EQEmu::legacy::SlotPrimary) && (m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->ItemType == ItemType2HSlash || m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->ItemType == ItemType2HBlunt || m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->ItemType == ItemType2HPiercing) && GetAA(aa2HandBash) >= 1))
|
||||
if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::legacy::SlotSecondary) && m_inv.GetItem(EQEmu::legacy::SlotSecondary)->GetItem()->ItemType == EQEmu::item::ItemTypeShield) || (m_inv.GetItem(EQEmu::legacy::SlotPrimary) && m_inv.GetItem(EQEmu::legacy::SlotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1))
|
||||
skill_to_use = SkillBash;
|
||||
}
|
||||
break;
|
||||
@@ -5372,7 +5364,7 @@ bool Bot::IsBotAttackAllowed(Mob* attacker, Mob* target, bool& hasRuleDefined) {
|
||||
void Bot::EquipBot(std::string* errorMessage) {
|
||||
GetBotItems(m_inv, errorMessage);
|
||||
const ItemInst* inst = 0;
|
||||
const Item_Struct* item = 0;
|
||||
const EQEmu::Item_Struct* item = 0;
|
||||
for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; ++i) {
|
||||
inst = GetBotItem(i);
|
||||
if(inst) {
|
||||
@@ -5499,7 +5491,7 @@ void Bot::SetAttackTimer() {
|
||||
float haste_mod = (GetHaste() * 0.01f);
|
||||
attack_timer.SetAtTrigger(4000, true);
|
||||
Timer* TimerToUse = nullptr;
|
||||
const Item_Struct* PrimaryWeapon = nullptr;
|
||||
const EQEmu::Item_Struct* PrimaryWeapon = nullptr;
|
||||
for (int i = EQEmu::legacy::SlotRange; i <= EQEmu::legacy::SlotSecondary; i++) {
|
||||
if (i == EQEmu::legacy::SlotPrimary)
|
||||
TimerToUse = &attack_timer;
|
||||
@@ -5510,14 +5502,14 @@ void Bot::SetAttackTimer() {
|
||||
else
|
||||
continue;
|
||||
|
||||
const Item_Struct* ItemToUse = nullptr;
|
||||
const EQEmu::Item_Struct* ItemToUse = nullptr;
|
||||
ItemInst* ci = GetBotItem(i);
|
||||
if (ci)
|
||||
ItemToUse = ci->GetItem();
|
||||
|
||||
if (i == EQEmu::legacy::SlotSecondary) {
|
||||
if (PrimaryWeapon != nullptr) {
|
||||
if (PrimaryWeapon->ItemClass == ItemClassCommon && (PrimaryWeapon->ItemType == ItemType2HSlash || PrimaryWeapon->ItemType == ItemType2HBlunt || PrimaryWeapon->ItemType == ItemType2HPiercing)) {
|
||||
if (PrimaryWeapon->IsClassCommon() && PrimaryWeapon->IsType2HWeapon()) {
|
||||
attack_dw_timer.Disable();
|
||||
continue;
|
||||
}
|
||||
@@ -5530,7 +5522,7 @@ void Bot::SetAttackTimer() {
|
||||
}
|
||||
|
||||
if (ItemToUse != nullptr) {
|
||||
if (ItemToUse->ItemClass != ItemClassCommon || ItemToUse->Damage == 0 || ItemToUse->Delay == 0 || ((ItemToUse->ItemType > ItemTypeLargeThrowing) && (ItemToUse->ItemType != ItemTypeMartial) && (ItemToUse->ItemType != ItemType2HPiercing)))
|
||||
if (!ItemToUse->IsClassCommon() || ItemToUse->Damage == 0 || ItemToUse->Delay == 0 || ((ItemToUse->ItemType > EQEmu::item::ItemTypeLargeThrowing) && (ItemToUse->ItemType != EQEmu::item::ItemTypeMartial) && (ItemToUse->ItemType != EQEmu::item::ItemType2HPiercing)))
|
||||
ItemToUse = nullptr;
|
||||
}
|
||||
|
||||
@@ -7185,7 +7177,7 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) {
|
||||
insr->TargetID = inspectedBot->GetNPCTypeID();
|
||||
insr->playerid = inspectedBot->GetID();
|
||||
|
||||
const Item_Struct* item = 0;
|
||||
const EQEmu::Item_Struct* item = 0;
|
||||
const ItemInst* inst = 0;
|
||||
|
||||
// Modded to display power source items (will only show up on SoF+ client inspect windows though.)
|
||||
@@ -7237,7 +7229,7 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) {
|
||||
|
||||
void Bot::CalcItemBonuses(StatBonuses* newbon)
|
||||
{
|
||||
const Item_Struct* itemtmp = 0;
|
||||
const EQEmu::Item_Struct* itemtmp = 0;
|
||||
|
||||
for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= (EQEmu::legacy::EQUIPMENT_END + 1); ++i) {
|
||||
const ItemInst* item = GetBotItem((i == 22 ? 9999 : i));
|
||||
@@ -7258,7 +7250,7 @@ void Bot::CalcItemBonuses(StatBonuses* newbon)
|
||||
}
|
||||
|
||||
void Bot::AddItemBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAug, bool isTribute, int rec_override) {
|
||||
if(!inst || !inst->IsType(ItemClassCommon))
|
||||
if (!inst || !inst->IsClassCommon())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -7268,11 +7260,11 @@ void Bot::AddItemBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAug,
|
||||
return;
|
||||
}
|
||||
|
||||
const Item_Struct *item = inst->GetItem();
|
||||
const EQEmu::Item_Struct *item = inst->GetItem();
|
||||
|
||||
if(!isTribute && !inst->IsEquipable(GetBaseRace(),GetClass()))
|
||||
{
|
||||
if(item->ItemType != ItemTypeFood && item->ItemType != ItemTypeDrink)
|
||||
if (item->ItemType != EQEmu::item::ItemTypeFood && item->ItemType != EQEmu::item::ItemTypeDrink)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7479,11 +7471,11 @@ void Bot::AddItemBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAug,
|
||||
else
|
||||
newbon->DSMitigation += item->DSMitigation;
|
||||
}
|
||||
if (item->Worn.Effect > 0 && item->Worn.Type == ET_WornEffect) {// latent effects
|
||||
if (item->Worn.Effect > 0 && item->Worn.Type == EQEmu::item::ItemEffectWorn) {// latent effects
|
||||
ApplySpellsBonuses(item->Worn.Effect, item->Worn.Level, newbon, 0, item->Worn.Type);
|
||||
}
|
||||
|
||||
if (item->Focus.Effect>0 && (item->Focus.Type == ET_Focus)) { // focus effects
|
||||
if (item->Focus.Effect>0 && (item->Focus.Type == EQEmu::item::ItemEffectFocus)) { // focus effects
|
||||
ApplySpellsBonuses(item->Focus.Effect, item->Focus.Level, newbon, 0);
|
||||
}
|
||||
|
||||
@@ -7635,7 +7627,7 @@ void Bot::CalcBotStats(bool showtext) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Bot::CheckLoreConflict(const Item_Struct* item) {
|
||||
bool Bot::CheckLoreConflict(const EQEmu::Item_Struct* item) {
|
||||
if (!item || !(item->LoreFlag))
|
||||
return false;
|
||||
|
||||
@@ -8043,7 +8035,7 @@ int Bot::GetRawACNoShield(int &shield_ac) {
|
||||
shield_ac = 0;
|
||||
ItemInst* inst = GetBotItem(EQEmu::legacy::SlotSecondary);
|
||||
if(inst) {
|
||||
if(inst->GetItem()->ItemType == ItemTypeShield) {
|
||||
if (inst->GetItem()->ItemType == EQEmu::item::ItemTypeShield) {
|
||||
ac -= inst->GetItem()->AC;
|
||||
shield_ac = inst->GetItem()->AC;
|
||||
for (uint8 i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
@@ -8058,7 +8050,7 @@ int Bot::GetRawACNoShield(int &shield_ac) {
|
||||
}
|
||||
|
||||
uint32 Bot::CalcCurrentWeight() {
|
||||
const Item_Struct* TempItem = 0;
|
||||
const EQEmu::Item_Struct* TempItem = 0;
|
||||
ItemInst* inst;
|
||||
uint32 Total = 0;
|
||||
for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user