Add support for vehicle scaling based on item level.

Requires database data.
Fixes issue #2754

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-08-24 15:04:34 -07:00
parent c0dda8b492
commit aaaeecc916
11 changed files with 151 additions and 23 deletions
+2 -18
View File
@@ -13577,22 +13577,6 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQue
pMenu->GetGossipMenu().AddGossipMenuItemData(itr->second.action_menu_id, itr->second.action_poi_id, itr->second.action_script_id);
}
}
// some gossips aren't handled in normal way ... so we need to do it this way .. TODO: handle it in normal way ;-)
/*if (pMenu->Empty())
{
if (pCreature->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_TRAINER))
{
// output error message if need
pCreature->isCanTrainingOf(this, true);
}
if (pCreature->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_BATTLEMASTER))
{
// output error message if need
pCreature->isCanInteractWithBattleMaster(this, true);
}
}*/
}
void Player::SendPreparedGossip(WorldObject *pSource)
@@ -24137,7 +24121,7 @@ void Player::_LoadRandomBGStatus(QueryResult_AutoPtr result)
float Player::GetAverageItemLevel()
{
uint32 sum = 0;
float sum = 0;
uint32 count = 0;
for (int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
@@ -24147,7 +24131,7 @@ float Player::GetAverageItemLevel()
continue;
if (m_items[i] && m_items[i]->GetProto())
sum += m_items[i]->GetProto()->ItemLevel;
sum += m_items[i]->GetProto()->GetItemLevelIncludingQuality();
count++;
}
+1 -1
View File
@@ -238,7 +238,7 @@ typedef std::list<PlayerCreateInfoAction> PlayerCreateInfoActions;
struct PlayerInfo
{
// existence checked by displayId != 0 // existence checked by displayId != 0
// existence checked by displayId != 0
PlayerInfo() : displayId_m(0),displayId_f(0),levelInfo(NULL)
{
}
+1 -1
View File
@@ -44,7 +44,7 @@ enum SocialFlag
SOCIAL_FLAG_FRIEND = 0x01,
SOCIAL_FLAG_IGNORED = 0x02,
SOCIAL_FLAG_MUTED = 0x04, // guessed
SOCIAL_FLAG_RAF = 0x08 // Recruit A Friend
SOCIAL_FLAG_UNK = 0x08 // Unknown - does not appear to be RaF
};
struct FriendInfo