mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore)
This commit is contained in:
+62
-62
@@ -49,7 +49,7 @@ extern WorldServer worldserver;
|
||||
bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_override)
|
||||
{
|
||||
int caster_level, buffslot, effect, effect_value, i;
|
||||
EQEmu::ItemInstance *SummonedItem=nullptr;
|
||||
EQ::ItemInstance *SummonedItem=nullptr;
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
#define _EDLEN 200
|
||||
char effect_desc[_EDLEN];
|
||||
@@ -65,7 +65,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
bool c_override = false;
|
||||
if (caster && caster->IsClient() && GetCastedSpellInvSlot() > 0) {
|
||||
const EQEmu::ItemInstance *inst = caster->CastToClient()->GetInv().GetItem(GetCastedSpellInvSlot());
|
||||
const EQ::ItemInstance *inst = caster->CastToClient()->GetInv().GetItem(GetCastedSpellInvSlot());
|
||||
if (inst) {
|
||||
if (inst->GetItem()->Click.Level > 0) {
|
||||
caster_level = inst->GetItem()->Click.Level;
|
||||
@@ -149,7 +149,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if (spells[spell_id].EndurUpkeep > 0)
|
||||
SetEndurUpkeep(true);
|
||||
|
||||
if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::maskUFAndLater)
|
||||
if (IsClient() && CastToClient()->ClientVersionBit() & EQ::versions::maskUFAndLater)
|
||||
{
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
||||
CastToClient()->FastQueuePacket(&outapp);
|
||||
@@ -158,7 +158,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
if(IsNPC())
|
||||
{
|
||||
std::vector<EQEmu::Any> args;
|
||||
std::vector<EQ::Any> args;
|
||||
args.push_back(&buffslot);
|
||||
int i = parse->EventSpell(EVENT_SPELL_EFFECT_NPC, CastToNPC(), nullptr, spell_id, caster ? caster->GetID() : 0, &args);
|
||||
if(i != 0){
|
||||
@@ -168,7 +168,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
}
|
||||
else if(IsClient())
|
||||
{
|
||||
std::vector<EQEmu::Any> args;
|
||||
std::vector<EQ::Any> args;
|
||||
args.push_back(&buffslot);
|
||||
int i = parse->EventSpell(EVENT_SPELL_EFFECT_CLIENT, nullptr, CastToClient(), spell_id, caster ? caster->GetID() : 0, &args);
|
||||
if(i != 0){
|
||||
@@ -627,7 +627,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
snprintf(effect_desc, _EDLEN, "Flesh To Bone");
|
||||
#endif
|
||||
if(IsClient()){
|
||||
EQEmu::ItemInstance* transI = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotCursor);
|
||||
EQ::ItemInstance* transI = CastToClient()->GetInv().GetItem(EQ::invslot::slotCursor);
|
||||
if (transI && transI->IsClassCommon() && transI->IsStackable()){
|
||||
uint32 fcharges = transI->GetCharges();
|
||||
//Does it sound like meat... maybe should check if it looks like meat too...
|
||||
@@ -637,7 +637,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
strstr(transI->GetItem()->Name, "Flesh") ||
|
||||
strstr(transI->GetItem()->Name, "parts") ||
|
||||
strstr(transI->GetItem()->Name, "Parts")){
|
||||
CastToClient()->DeleteItemInInventory(EQEmu::invslot::slotCursor, fcharges, true);
|
||||
CastToClient()->DeleteItemInInventory(EQ::invslot::slotCursor, fcharges, true);
|
||||
CastToClient()->SummonItem(13073, fcharges);
|
||||
}
|
||||
else{
|
||||
@@ -829,7 +829,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#endif
|
||||
if(IsClient())
|
||||
{
|
||||
if (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoDAndLater)
|
||||
if (CastToClient()->ClientVersionBit() & EQ::versions::maskSoDAndLater)
|
||||
{
|
||||
bodyType bt = BT_Undead;
|
||||
|
||||
@@ -1152,7 +1152,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
case SE_SummonItem:
|
||||
{
|
||||
const EQEmu::ItemData *item = database.GetItem(spell.base[i]);
|
||||
const EQ::ItemData *item = database.GetItem(spell.base[i]);
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
const char *itemname = item ? item->Name : "*Unknown Item*";
|
||||
snprintf(effect_desc, _EDLEN, "Summon Item: %s (id %d)", itemname, spell.base[i]);
|
||||
@@ -1177,7 +1177,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
if (SummonedItem) {
|
||||
c->PushItemOnCursor(*SummonedItem);
|
||||
c->SendItemPacket(EQEmu::invslot::slotCursor, SummonedItem, ItemPacketLimbo);
|
||||
c->SendItemPacket(EQ::invslot::slotCursor, SummonedItem, ItemPacketLimbo);
|
||||
safe_delete(SummonedItem);
|
||||
}
|
||||
SummonedItem = database.CreateItem(spell.base[i], charges);
|
||||
@@ -1188,7 +1188,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
}
|
||||
case SE_SummonItemIntoBag:
|
||||
{
|
||||
const EQEmu::ItemData *item = database.GetItem(spell.base[i]);
|
||||
const EQ::ItemData *item = database.GetItem(spell.base[i]);
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
const char *itemname = item ? item->Name : "*Unknown Item*";
|
||||
snprintf(effect_desc, _EDLEN, "Summon Item In Bag: %s (id %d)", itemname, spell.base[i]);
|
||||
@@ -1217,7 +1217,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if (charges < 1)
|
||||
charges = 1;
|
||||
|
||||
EQEmu::ItemInstance *SubItem = database.CreateItem(spell.base[i], charges);
|
||||
EQ::ItemInstance *SubItem = database.CreateItem(spell.base[i], charges);
|
||||
if (SubItem != nullptr) {
|
||||
SummonedItem->PutItem(slot, *SubItem);
|
||||
safe_delete(SubItem);
|
||||
@@ -1247,7 +1247,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
// Will fix buttons for now
|
||||
if (IsClient()) {
|
||||
auto c = CastToClient();
|
||||
if (c->ClientVersionBit() & EQEmu::versions::maskUFAndLater) {
|
||||
if (c->ClientVersionBit() & EQ::versions::maskUFAndLater) {
|
||||
c->SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
c->SetPetCommandState(PET_BUTTON_STOP, 0);
|
||||
c->SetPetCommandState(PET_BUTTON_REGROUP, 0);
|
||||
@@ -1466,7 +1466,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
}
|
||||
}
|
||||
|
||||
for (int x = EQEmu::textures::textureBegin; x <= EQEmu::textures::LastTintableTexture; x++)
|
||||
for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++)
|
||||
SendWearChange(x);
|
||||
|
||||
if (caster == this && spell.id != 287 && spell.id != 601 &&
|
||||
@@ -1492,7 +1492,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
);
|
||||
caster->SendAppearancePacket(AT_Size, static_cast<uint32>(caster->GetTarget()->GetSize()));
|
||||
|
||||
for (int x = EQEmu::textures::textureBegin; x <= EQEmu::textures::LastTintableTexture; x++)
|
||||
for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++)
|
||||
caster->SendWearChange(x);
|
||||
}
|
||||
}
|
||||
@@ -1670,7 +1670,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#endif
|
||||
// This is handled by the client prior to SoD.
|
||||
//
|
||||
if (IsClient() && (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoDAndLater))
|
||||
if (IsClient() && (CastToClient()->ClientVersionBit() & EQ::versions::maskSoDAndLater))
|
||||
CastToClient()->LocateCorpse();
|
||||
|
||||
break;
|
||||
@@ -2278,7 +2278,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
snprintf(effect_desc, _EDLEN, "Rampage");
|
||||
#endif
|
||||
if(caster)
|
||||
entity_list.AEAttack(caster, 30, EQEmu::invslot::slotPrimary, 0, true); // on live wars dont get a duration ramp, its a one shot deal
|
||||
entity_list.AEAttack(caster, 30, EQ::invslot::slotPrimary, 0, true); // on live wars dont get a duration ramp, its a one shot deal
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -2329,10 +2329,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
focus = caster->GetFocusEffect(focusFcBaseEffects, spell_id);
|
||||
|
||||
switch(spells[spell_id].skill) {
|
||||
case EQEmu::skills::SkillThrowing:
|
||||
case EQ::skills::SkillThrowing:
|
||||
caster->DoThrowingAttackDmg(this, nullptr, nullptr, spells[spell_id].base[i],spells[spell_id].base2[i], focus, ReuseTime);
|
||||
break;
|
||||
case EQEmu::skills::SkillArchery:
|
||||
case EQ::skills::SkillArchery:
|
||||
caster->DoArcheryAttackDmg(this, nullptr, nullptr, spells[spell_id].base[i],spells[spell_id].base2[i],focus, ReuseTime);
|
||||
break;
|
||||
default:
|
||||
@@ -2532,7 +2532,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
case SE_FcTimerRefresh:
|
||||
{
|
||||
if(IsClient()) {
|
||||
for (unsigned int i = 0; i < EQEmu::spells::SPELL_GEM_COUNT; ++i) {
|
||||
for (unsigned int i = 0; i < EQ::spells::SPELL_GEM_COUNT; ++i) {
|
||||
if(IsValidSpell(CastToClient()->m_pp.mem_spells[i])) {
|
||||
if (CalcFocusEffect(focusFcTimerRefresh, spell_id, CastToClient()->m_pp.mem_spells[i])){
|
||||
CastToClient()->m_pp.spellSlotRefresh[i] = 1;
|
||||
@@ -2801,7 +2801,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
if (caster && IsValidSpell(spells[spell_id].base2[i])){
|
||||
if(zone->random.Roll(spells[spell_id].base[i]))
|
||||
caster->SpellFinished(spells[spell_id].base2[i], this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[spells[spell_id].base2[i]].ResistDiff);
|
||||
caster->SpellFinished(spells[spell_id].base2[i], this, EQ::spells::CastingSlot::Item, 0, -1, spells[spells[spell_id].base2[i]].ResistDiff);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3080,7 +3080,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if (SummonedItem) {
|
||||
Client *c=CastToClient();
|
||||
c->PushItemOnCursor(*SummonedItem);
|
||||
c->SendItemPacket(EQEmu::invslot::slotCursor, SummonedItem, ItemPacketLimbo);
|
||||
c->SendItemPacket(EQ::invslot::slotCursor, SummonedItem, ItemPacketLimbo);
|
||||
safe_delete(SummonedItem);
|
||||
}
|
||||
|
||||
@@ -3105,7 +3105,7 @@ int Mob::CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level,
|
||||
effect_value = CalcSpellEffectValue_formula(formula, base, max, caster_level, spell_id, ticsremaining);
|
||||
|
||||
// this doesn't actually need to be a song to get mods, just the right skill
|
||||
if (EQEmu::skills::IsBardInstrumentSkill(spells[spell_id].skill) &&
|
||||
if (EQ::skills::IsBardInstrumentSkill(spells[spell_id].skill) &&
|
||||
spells[spell_id].effectid[effect_id] != SE_AttackSpeed &&
|
||||
spells[spell_id].effectid[effect_id] != SE_AttackSpeed2 &&
|
||||
spells[spell_id].effectid[effect_id] != SE_AttackSpeed3 &&
|
||||
@@ -3464,7 +3464,7 @@ void Mob::BuffProcess()
|
||||
LogSpells("Buff [{}] in slot [{}] has [{}] tics remaining", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining);
|
||||
}
|
||||
}
|
||||
else if (IsClient() && !(CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater))
|
||||
else if (IsClient() && !(CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater))
|
||||
{
|
||||
buffs[buffs_i].UpdateClient = true;
|
||||
}
|
||||
@@ -3476,7 +3476,7 @@ void Mob::BuffProcess()
|
||||
{
|
||||
CastToClient()->SendBuffDurationPacket(buffs[buffs_i], buffs_i);
|
||||
// Hack to get UF to play nicer, RoF seems fine without it
|
||||
if (CastToClient()->ClientVersion() == EQEmu::versions::ClientVersion::UF && buffs[buffs_i].numhits > 0)
|
||||
if (CastToClient()->ClientVersion() == EQ::versions::ClientVersion::UF && buffs[buffs_i].numhits > 0)
|
||||
CastToClient()->SendBuffNumHitPacket(buffs[buffs_i], buffs_i);
|
||||
buffs[buffs_i].UpdateClient = false;
|
||||
}
|
||||
@@ -3495,7 +3495,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
const SPDat_Spell_Struct &spell = spells[buff.spellid];
|
||||
|
||||
if (IsNPC()) {
|
||||
std::vector<EQEmu::Any> args;
|
||||
std::vector<EQ::Any> args;
|
||||
args.push_back(&buff.ticsremaining);
|
||||
args.push_back(&buff.casterlevel);
|
||||
args.push_back(&slot);
|
||||
@@ -3505,7 +3505,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
std::vector<EQEmu::Any> args;
|
||||
std::vector<EQ::Any> args;
|
||||
args.push_back(&buff.ticsremaining);
|
||||
args.push_back(&buff.casterlevel);
|
||||
args.push_back(&slot);
|
||||
@@ -3686,13 +3686,13 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
if (!IsBardSong(buff.spellid)) {
|
||||
double break_chance = 2.0;
|
||||
if (caster) {
|
||||
break_chance -= (2 * (((double)caster->GetSkill(EQEmu::skills::SkillDivination) +
|
||||
break_chance -= (2 * (((double)caster->GetSkill(EQ::skills::SkillDivination) +
|
||||
((double)caster->GetLevel() * 3.0)) /
|
||||
650.0));
|
||||
} else {
|
||||
break_chance -=
|
||||
(2 *
|
||||
(((double)GetSkill(EQEmu::skills::SkillDivination) + ((double)GetLevel() * 3.0)) /
|
||||
(((double)GetSkill(EQ::skills::SkillDivination) + ((double)GetLevel() * 3.0)) /
|
||||
650.0));
|
||||
}
|
||||
|
||||
@@ -3724,14 +3724,14 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
case SE_CastOnFadeEffectNPC:
|
||||
case SE_CastOnFadeEffectAlways: {
|
||||
if (buff.ticsremaining == 0) {
|
||||
SpellFinished(spells[buff.spellid].base[i], this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[spells[buff.spellid].base[i]].ResistDiff);
|
||||
SpellFinished(spells[buff.spellid].base[i], this, EQ::spells::CastingSlot::Item, 0, -1, spells[spells[buff.spellid].base[i]].ResistDiff);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SE_LocateCorpse: {
|
||||
// This is handled by the client prior to SoD.
|
||||
|
||||
if (IsClient() && (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoDAndLater))
|
||||
if (IsClient() && (CastToClient()->ClientVersionBit() & EQ::versions::maskSoDAndLater))
|
||||
CastToClient()->LocateCorpse();
|
||||
}
|
||||
|
||||
@@ -3812,12 +3812,12 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
}
|
||||
|
||||
if(IsClient()) {
|
||||
std::vector<EQEmu::Any> args;
|
||||
std::vector<EQ::Any> args;
|
||||
args.push_back(&buffs[slot].casterid);
|
||||
|
||||
parse->EventSpell(EVENT_SPELL_FADE, nullptr, CastToClient(), buffs[slot].spellid, slot, &args);
|
||||
} else if(IsNPC()) {
|
||||
std::vector<EQEmu::Any> args;
|
||||
std::vector<EQ::Any> args;
|
||||
args.push_back(&buffs[slot].casterid);
|
||||
|
||||
parse->EventSpell(EVENT_SPELL_FADE, CastToNPC(), nullptr, buffs[slot].spellid, slot, &args);
|
||||
@@ -3889,7 +3889,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
else{
|
||||
SendAppearancePacket(AT_Size, 6);
|
||||
}
|
||||
for (int x = EQEmu::textures::textureBegin; x <= EQEmu::textures::LastTintableTexture; x++){
|
||||
for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++){
|
||||
SendWearChange(x);
|
||||
}
|
||||
break;
|
||||
@@ -4155,7 +4155,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
{
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket();
|
||||
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::maskSoDAndLater);
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQ::versions::maskSoDAndLater);
|
||||
if(IsClient() && GetTarget() == this) {
|
||||
CastToClient()->QueuePacket(outapp);
|
||||
}
|
||||
@@ -4165,11 +4165,11 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
|
||||
if (IsNPC()) {
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket();
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::maskSoDAndLater, true);
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQ::versions::maskSoDAndLater, true);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::maskUFAndLater)
|
||||
if (IsClient() && CastToClient()->ClientVersionBit() & EQ::versions::maskUFAndLater)
|
||||
{
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
||||
CastToClient()->FastQueuePacket(&outapp);
|
||||
@@ -5170,7 +5170,7 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
||||
|
||||
if (Caston_spell_id) {
|
||||
if (IsValidSpell(Caston_spell_id) && (Caston_spell_id != spell_id))
|
||||
SpellFinished(Caston_spell_id, this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[Caston_spell_id].ResistDiff);
|
||||
SpellFinished(Caston_spell_id, this, EQ::spells::CastingSlot::Item, 0, -1, spells[Caston_spell_id].ResistDiff);
|
||||
}
|
||||
|
||||
return (value * lvlModifier / 100);
|
||||
@@ -5189,15 +5189,15 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
|
||||
//item focus
|
||||
if (itembonuses.FocusEffects[type]){
|
||||
|
||||
const EQEmu::ItemData* TempItem = nullptr;
|
||||
const EQ::ItemData* TempItem = nullptr;
|
||||
|
||||
for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; x++)
|
||||
for (int x = EQ::invslot::EQUIPMENT_BEGIN; x <= EQ::invslot::EQUIPMENT_END; x++)
|
||||
{
|
||||
if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS)
|
||||
continue;
|
||||
|
||||
TempItem = nullptr;
|
||||
EQEmu::ItemInstance* ins = GetInv().GetItem(x);
|
||||
EQ::ItemInstance* ins = GetInv().GetItem(x);
|
||||
if (!ins)
|
||||
continue;
|
||||
TempItem = ins->GetItem();
|
||||
@@ -5211,16 +5211,16 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
|
||||
}
|
||||
}
|
||||
|
||||
for (int y = EQEmu::invaug::SOCKET_BEGIN; y <= EQEmu::invaug::SOCKET_END; ++y)
|
||||
for (int y = EQ::invaug::SOCKET_BEGIN; y <= EQ::invaug::SOCKET_END; ++y)
|
||||
{
|
||||
if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS)
|
||||
continue;
|
||||
|
||||
EQEmu::ItemInstance *aug = nullptr;
|
||||
EQ::ItemInstance *aug = nullptr;
|
||||
aug = ins->GetAugment(y);
|
||||
if(aug)
|
||||
{
|
||||
const EQEmu::ItemData* TempItemAug = aug->GetItem();
|
||||
const EQ::ItemData* TempItemAug = aug->GetItem();
|
||||
if (TempItemAug && TempItemAug->Focus.Effect > 0 && IsValidSpell(TempItemAug->Focus.Effect)) {
|
||||
proc_spellid = CalcFocusEffect(type, TempItemAug->Focus.Effect, spell_id);
|
||||
if (IsValidSpell(proc_spellid)){
|
||||
@@ -5318,18 +5318,18 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
|
||||
//Check if item focus effect exists for the client.
|
||||
if (itembonuses.FocusEffects[type]){
|
||||
|
||||
const EQEmu::ItemData* TempItem = nullptr;
|
||||
const EQEmu::ItemData* UsedItem = nullptr;
|
||||
const EQ::ItemData* TempItem = nullptr;
|
||||
const EQ::ItemData* UsedItem = nullptr;
|
||||
uint16 UsedFocusID = 0;
|
||||
int16 Total = 0;
|
||||
int16 focus_max = 0;
|
||||
int16 focus_max_real = 0;
|
||||
|
||||
//item focus
|
||||
for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; x++)
|
||||
for (int x = EQ::invslot::EQUIPMENT_BEGIN; x <= EQ::invslot::EQUIPMENT_END; x++)
|
||||
{
|
||||
TempItem = nullptr;
|
||||
EQEmu::ItemInstance* ins = GetInv().GetItem(x);
|
||||
EQ::ItemInstance* ins = GetInv().GetItem(x);
|
||||
if (!ins)
|
||||
continue;
|
||||
TempItem = ins->GetItem();
|
||||
@@ -5360,13 +5360,13 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
|
||||
}
|
||||
}
|
||||
|
||||
for (int y = EQEmu::invaug::SOCKET_BEGIN; y <= EQEmu::invaug::SOCKET_END; ++y)
|
||||
for (int y = EQ::invaug::SOCKET_BEGIN; y <= EQ::invaug::SOCKET_END; ++y)
|
||||
{
|
||||
EQEmu::ItemInstance *aug = nullptr;
|
||||
EQ::ItemInstance *aug = nullptr;
|
||||
aug = ins->GetAugment(y);
|
||||
if(aug)
|
||||
{
|
||||
const EQEmu::ItemData* TempItemAug = aug->GetItem();
|
||||
const EQ::ItemData* TempItemAug = aug->GetItem();
|
||||
if (TempItemAug && TempItemAug->Focus.Effect > 0 && TempItemAug->Focus.Effect != SPELL_UNKNOWN) {
|
||||
if(rand_effectiveness) {
|
||||
focus_max = CalcFocusEffect(type, TempItemAug->Focus.Effect, spell_id, true);
|
||||
@@ -5398,10 +5398,10 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
|
||||
}
|
||||
|
||||
//Tribute Focus
|
||||
for (int x = EQEmu::invslot::TRIBUTE_BEGIN; x <= EQEmu::invslot::TRIBUTE_END; ++x)
|
||||
for (int x = EQ::invslot::TRIBUTE_BEGIN; x <= EQ::invslot::TRIBUTE_END; ++x)
|
||||
{
|
||||
TempItem = nullptr;
|
||||
EQEmu::ItemInstance* ins = GetInv().GetItem(x);
|
||||
EQ::ItemInstance* ins = GetInv().GetItem(x);
|
||||
if (!ins)
|
||||
continue;
|
||||
TempItem = ins->GetItem();
|
||||
@@ -5590,16 +5590,16 @@ int16 NPC::GetFocusEffect(focusType type, uint16 spell_id) {
|
||||
|
||||
if (RuleB(Spells, NPC_UseFocusFromItems) && itembonuses.FocusEffects[type]){
|
||||
|
||||
const EQEmu::ItemData* TempItem = nullptr;
|
||||
const EQEmu::ItemData* UsedItem = nullptr;
|
||||
const EQ::ItemData* TempItem = nullptr;
|
||||
const EQ::ItemData* UsedItem = nullptr;
|
||||
uint16 UsedFocusID = 0;
|
||||
int16 Total = 0;
|
||||
int16 focus_max = 0;
|
||||
int16 focus_max_real = 0;
|
||||
|
||||
//item focus
|
||||
for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++){
|
||||
const EQEmu::ItemData *cur = database.GetItem(equipment[i]);
|
||||
for (int i = EQ::invslot::EQUIPMENT_BEGIN; i <= EQ::invslot::EQUIPMENT_END; i++){
|
||||
const EQ::ItemData *cur = database.GetItem(equipment[i]);
|
||||
|
||||
if(!cur)
|
||||
continue;
|
||||
@@ -6702,7 +6702,7 @@ bool Mob::TrySpellProjectile(Mob* spell_target, uint16 spell_id, float speed){
|
||||
ProjectileAtk[slot].origin_x = GetX();
|
||||
ProjectileAtk[slot].origin_y = GetY();
|
||||
ProjectileAtk[slot].origin_z = GetZ();
|
||||
ProjectileAtk[slot].skill = EQEmu::skills::SkillConjuration;
|
||||
ProjectileAtk[slot].skill = EQ::skills::SkillConjuration;
|
||||
ProjectileAtk[slot].speed_mod = speed_mod;
|
||||
|
||||
SetProjectileAttack(true);
|
||||
@@ -6758,7 +6758,7 @@ void Mob::ResourceTap(int32 damage, uint16 spellid)
|
||||
if (damage > 0)
|
||||
HealDamage(damage);
|
||||
else
|
||||
Damage(this, -damage, 0, EQEmu::skills::SkillEvocation, false);
|
||||
Damage(this, -damage, 0, EQ::skills::SkillEvocation, false);
|
||||
}
|
||||
|
||||
if (spells[spellid].base2[i] == 1) // Mana Tap
|
||||
@@ -6801,10 +6801,10 @@ void Mob::TryTriggerThreshHold(int32 damage, int effect_id, Mob* attacker){
|
||||
if (IsValidSpell(spell_id)) {
|
||||
|
||||
if (IsBeneficialSpell(spell_id))
|
||||
SpellFinished(spell_id, this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff);
|
||||
SpellFinished(spell_id, this, EQ::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff);
|
||||
|
||||
else if(attacker)
|
||||
SpellFinished(spell_id, attacker, EQEmu::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff);
|
||||
SpellFinished(spell_id, attacker, EQ::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6875,7 +6875,7 @@ void Mob::CalcSpellPowerDistanceMod(uint16 spell_id, float range, Mob* caster)
|
||||
else
|
||||
distance = sqrt(range);
|
||||
|
||||
distance = EQEmu::Clamp(distance, spells[spell_id].min_dist, spells[spell_id].max_dist);
|
||||
distance = EQ::Clamp(distance, spells[spell_id].min_dist, spells[spell_id].max_dist);
|
||||
|
||||
float dm_range = spells[spell_id].max_dist - spells[spell_id].min_dist;
|
||||
float dm_mod_interval = spells[spell_id].max_dist_mod - spells[spell_id].min_dist_mod;
|
||||
|
||||
Reference in New Issue
Block a user