diff options
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
| -rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index ae06e6f7505..738e0956263 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -714,13 +714,13 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex) Item *item = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK); if (item) { - float dmg_min = item->GetProto()->Damage->DamageMin; - float dmg_max = item->GetProto()->Damage->DamageMax; + float dmg_min = item->GetTemplate()->Damage->DamageMin; + float dmg_max = item->GetTemplate()->Damage->DamageMax; if (dmg_max == 0.0f && dmg_min > dmg_max) damage += int32(dmg_min); else damage += irand(int32(dmg_min), int32(dmg_max)); - damage += int32(m_caster->ToPlayer()->GetAmmoDPS()*item->GetProto()->Delay*0.001f); + damage += int32(m_caster->ToPlayer()->GetAmmoDPS()*item->GetTemplate()->Delay*0.001f); } } } @@ -2377,7 +2377,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype) Player* player = (Player*)unitTarget; uint32 newitemid = itemtype; - ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(newitemid); + ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(newitemid); if (!pProto) { player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); @@ -2458,7 +2458,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype) } // set the "Crafted by ..." property of the item - if (pItem->GetProto()->Class != ITEM_CLASS_CONSUMABLE && pItem->GetProto()->Class != ITEM_CLASS_QUEST && newitemid != 6265 && newitemid != 6948) + if (pItem->GetTemplate()->Class != ITEM_CLASS_CONSUMABLE && pItem->GetTemplate()->Class != ITEM_CLASS_QUEST && newitemid != 6265 && newitemid != 6948) pItem->SetUInt32Value(ITEM_FIELD_CREATOR, player->GetGUIDLow()); // send info to the client @@ -2811,7 +2811,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) } else if (itemTarget) { - lockId = itemTarget->GetProto()->LockID; + lockId = itemTarget->GetTemplate()->LockID; guid = itemTarget->GetGUID(); } else @@ -3478,7 +3478,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex) else { // do not increase skill if vellum used - if (!(m_CastItem && m_CastItem->GetProto()->Flags & ITEM_PROTO_FLAG_TRIGGERED_CAST)) + if (!(m_CastItem && m_CastItem->GetTemplate()->Flags & ITEM_PROTO_FLAG_TRIGGERED_CAST)) p_caster->UpdateCraftSkill(m_spellInfo->Id); uint32 enchant_id = m_spellInfo->EffectMiscValue[effIndex]; @@ -3498,7 +3498,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex) { sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", p_caster->GetName(),p_caster->GetSession()->GetAccountId(), - itemTarget->GetProto()->Name1,itemTarget->GetEntry(), + itemTarget->GetTemplate()->Name1,itemTarget->GetEntry(), item_owner->GetName(),item_owner->GetSession()->GetAccountId()); } @@ -3559,7 +3559,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) { sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", p_caster->GetName(),p_caster->GetSession()->GetAccountId(), - itemTarget->GetProto()->Name1,itemTarget->GetEntry(), + itemTarget->GetTemplate()->Name1,itemTarget->GetEntry(), item_owner->GetName(),item_owner->GetSession()->GetAccountId()); } @@ -3689,7 +3689,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) { sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)", p_caster->GetName(), p_caster->GetSession()->GetAccountId(), - itemTarget->GetProto()->Name1, itemTarget->GetEntry(), + itemTarget->GetTemplate()->Name1, itemTarget->GetEntry(), item_owner->GetName(), item_owner->GetSession()->GetAccountId()); } @@ -3987,7 +3987,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex) // 50% more damage with daggers if (m_caster->GetTypeId() == TYPEID_PLAYER) if (Item* item = m_caster->ToPlayer()->GetWeaponForAttack(m_attackType, true)) - if (item->GetProto()->SubClass == ITEM_SUBCLASS_WEAPON_DAGGER) + if (item->GetTemplate()->SubClass == ITEM_SUBCLASS_WEAPON_DAGGER) totalDamagePercentMod *= 1.5f; } // Mutilate (for each hand) @@ -5697,7 +5697,7 @@ void Spell::EffectDisEnchant(SpellEffIndex /*effIndex*/) return; Player* p_caster = (Player*)m_caster; - if (!itemTarget || !itemTarget->GetProto()->DisenchantID) + if (!itemTarget || !itemTarget->GetTemplate()->DisenchantID) return; p_caster->UpdateCraftSkill(m_spellInfo->Id); @@ -5740,7 +5740,7 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex) if (!pet->isAlive()) return; - int32 benefit = pet->GetCurrentFoodBenefitLevel(foodItem->GetProto()->ItemLevel); + int32 benefit = pet->GetCurrentFoodBenefitLevel(foodItem->GetTemplate()->ItemLevel); if (benefit <= 0) return; @@ -6484,7 +6484,7 @@ void Spell::EffectProspecting(SpellEffIndex /*effIndex*/) return; Player* p_caster = (Player*)m_caster; - if (!itemTarget || !(itemTarget->GetProto()->Flags & ITEM_PROTO_FLAG_PROSPECTABLE)) + if (!itemTarget || !(itemTarget->GetTemplate()->Flags & ITEM_PROTO_FLAG_PROSPECTABLE)) return; if (itemTarget->GetCount() < 5) @@ -6493,7 +6493,7 @@ void Spell::EffectProspecting(SpellEffIndex /*effIndex*/) if (sWorld->getBoolConfig(CONFIG_SKILL_PROSPECTING)) { uint32 SkillValue = p_caster->GetPureSkillValue(SKILL_JEWELCRAFTING); - uint32 reqSkillValue = itemTarget->GetProto()->RequiredSkillRank; + uint32 reqSkillValue = itemTarget->GetTemplate()->RequiredSkillRank; p_caster->UpdateGatherSkill(SKILL_JEWELCRAFTING, SkillValue, reqSkillValue); } @@ -6506,7 +6506,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/) return; Player* p_caster = (Player*)m_caster; - if (!itemTarget || !(itemTarget->GetProto()->Flags & ITEM_PROTO_FLAG_MILLABLE)) + if (!itemTarget || !(itemTarget->GetTemplate()->Flags & ITEM_PROTO_FLAG_MILLABLE)) return; if (itemTarget->GetCount() < 5) @@ -6515,7 +6515,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/) if (sWorld->getBoolConfig(CONFIG_SKILL_MILLING)) { uint32 SkillValue = p_caster->GetPureSkillValue(SKILL_INSCRIPTION); - uint32 reqSkillValue = itemTarget->GetProto()->RequiredSkillRank; + uint32 reqSkillValue = itemTarget->GetTemplate()->RequiredSkillRank; p_caster->UpdateGatherSkill(SKILL_INSCRIPTION, SkillValue, reqSkillValue); } @@ -6874,7 +6874,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const * // level of pet summoned using engineering item based at engineering skill level if (m_CastItem && caster->GetTypeId() == TYPEID_PLAYER) - if (ItemPrototype const *proto = m_CastItem->GetProto()) + if (ItemTemplate const *proto = m_CastItem->GetTemplate()) if (proto->RequiredSkill == SKILL_ENGINERING) if (uint16 skill202 = caster->ToPlayer()->GetSkillValue(SKILL_ENGINERING)) level = skill202/5; @@ -7095,7 +7095,7 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/) uint32 item_id = m_spellInfo->EffectItemType[0]; - ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item_id); + ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item_id); if (!pProto) { player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); |
