REPO: code-style clean-up
* Fixed pPlayer->player * Fixed pCreature->creature ~DevNote: codestyle for Player should be (*player), not *plr or *p... same goes for Creatures (*creature)... more cleaning needed. We've way too many codestyles happening here.
This commit is contained in:
@@ -778,14 +778,14 @@ bool Item::CanBeTraded(bool mail, bool trade) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Item::HasEnchantRequiredSkill(const Player* pPlayer) const
|
||||
bool Item::HasEnchantRequiredSkill(const Player* player) const
|
||||
{
|
||||
|
||||
// Check all enchants for required skill
|
||||
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
|
||||
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
|
||||
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
|
||||
if (enchantEntry->requiredSkill && pPlayer->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue)
|
||||
if (enchantEntry->requiredSkill && player->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -264,7 +264,7 @@ class Item : public Object
|
||||
void SetInTrade(bool b = true) { mb_in_trade = b; }
|
||||
bool IsInTrade() const { return mb_in_trade; }
|
||||
|
||||
bool HasEnchantRequiredSkill(const Player* pPlayer) const;
|
||||
bool HasEnchantRequiredSkill(const Player* player) const;
|
||||
uint32 GetEnchantRequiredLevel() const;
|
||||
|
||||
bool IsFitToSpellRequirements(SpellInfo const* spellInfo) const;
|
||||
|
||||
Reference in New Issue
Block a user