mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Update ItemPrototype.cpp, codestyle and indentation cleanup
(cherry picked from commit a6005d98e7)
# Conflicts:
# src/server/game/Entities/Item/ItemPrototype.cpp
This commit is contained in:
@@ -57,19 +57,19 @@ bool ItemTemplate::CanChangeEquipStateInCombat() const
|
||||
{
|
||||
switch (GetInventoryType())
|
||||
{
|
||||
case INVTYPE_RELIC:
|
||||
case INVTYPE_SHIELD:
|
||||
case INVTYPE_HOLDABLE:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
case INVTYPE_RELIC:
|
||||
case INVTYPE_SHIELD:
|
||||
case INVTYPE_HOLDABLE:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (GetClass())
|
||||
{
|
||||
case ITEM_CLASS_WEAPON:
|
||||
case ITEM_CLASS_PROJECTILE:
|
||||
return true;
|
||||
case ITEM_CLASS_WEAPON:
|
||||
case ITEM_CLASS_PROJECTILE:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -77,7 +77,7 @@ bool ItemTemplate::CanChangeEquipStateInCombat() const
|
||||
|
||||
uint32 ItemTemplate::GetSkill() const
|
||||
{
|
||||
const static uint32 item_weapon_skills[MAX_ITEM_SUBCLASS_WEAPON] =
|
||||
static uint32 const itemWeaponSkills[MAX_ITEM_SUBCLASS_WEAPON] =
|
||||
{
|
||||
SKILL_AXES, SKILL_TWO_HANDED_AXES, SKILL_BOWS, SKILL_GUNS, SKILL_MACES,
|
||||
SKILL_TWO_HANDED_MACES, SKILL_POLEARMS, SKILL_SWORDS, SKILL_TWO_HANDED_SWORDS, SKILL_WARGLAIVES,
|
||||
@@ -86,7 +86,7 @@ uint32 ItemTemplate::GetSkill() const
|
||||
SKILL_FISHING
|
||||
};
|
||||
|
||||
const static uint32 item_armor_skills[MAX_ITEM_SUBCLASS_ARMOR] =
|
||||
static uint32 const itemArmorSkills[MAX_ITEM_SUBCLASS_ARMOR] =
|
||||
{
|
||||
0, SKILL_CLOTH, SKILL_LEATHER, SKILL_MAIL, SKILL_PLATE_MAIL, 0, SKILL_SHIELD, 0, 0, 0, 0
|
||||
};
|
||||
@@ -94,20 +94,20 @@ uint32 ItemTemplate::GetSkill() const
|
||||
|
||||
switch (GetClass())
|
||||
{
|
||||
case ITEM_CLASS_WEAPON:
|
||||
if (GetSubClass() >= MAX_ITEM_SUBCLASS_WEAPON)
|
||||
return 0;
|
||||
else
|
||||
return item_weapon_skills[GetSubClass()];
|
||||
case ITEM_CLASS_WEAPON:
|
||||
if (GetSubClass() >= MAX_ITEM_SUBCLASS_WEAPON)
|
||||
return 0;
|
||||
else
|
||||
return itemWeaponSkills[GetSubClass()];
|
||||
|
||||
case ITEM_CLASS_ARMOR:
|
||||
if (GetSubClass() >= MAX_ITEM_SUBCLASS_ARMOR)
|
||||
return 0;
|
||||
else
|
||||
return item_armor_skills[GetSubClass()];
|
||||
case ITEM_CLASS_ARMOR:
|
||||
if (GetSubClass() >= MAX_ITEM_SUBCLASS_ARMOR)
|
||||
return 0;
|
||||
else
|
||||
return itemArmorSkills[GetSubClass()];
|
||||
|
||||
default:
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user