Merge branch 'master' of git@github.com:azerothcore/azerothcore-wotlk.git

# Conflicts:
#	src/server/game/Battlegrounds/ArenaTeam.cpp
#	src/server/game/Entities/Player/Player.h
#	src/server/game/Handlers/BattleGroundHandler.cpp
#	src/server/game/Handlers/MiscHandler.cpp
#	src/server/game/Scripting/ScriptMgr.h
#	src/server/game/World/World.h
#	src/server/shared/Database/Implementation/CharacterDatabase.cpp
#	src/server/shared/Database/Implementation/CharacterDatabase.h
#	src/server/worldserver/worldserver.conf.dist
This commit is contained in:
Yehonal
2016-08-08 12:16:55 +02:00
3 changed files with 14 additions and 42 deletions
+2 -33
View File
@@ -512,41 +512,10 @@ Player* Item::GetOwner()const
return ObjectAccessor::FindPlayer(GetOwnerGUID());
}
// Legacy / Shortcut
uint32 Item::GetSkill()
{
const static uint32 item_weapon_skills[MAX_ITEM_SUBCLASS_WEAPON] =
{
SKILL_AXES, SKILL_2H_AXES, SKILL_BOWS, SKILL_GUNS, SKILL_MACES,
SKILL_2H_MACES, SKILL_POLEARMS, SKILL_SWORDS, SKILL_2H_SWORDS, 0,
SKILL_STAVES, 0, 0, SKILL_FIST_WEAPONS, 0,
SKILL_DAGGERS, SKILL_THROWN, SKILL_ASSASSINATION, SKILL_CROSSBOWS, SKILL_WANDS,
SKILL_FISHING
};
const static uint32 item_armor_skills[MAX_ITEM_SUBCLASS_ARMOR] =
{
0, SKILL_CLOTH, SKILL_LEATHER, SKILL_MAIL, SKILL_PLATE_MAIL, 0, SKILL_SHIELD, 0, 0, 0, 0
};
ItemTemplate const* proto = GetTemplate();
switch (proto->Class)
{
case ITEM_CLASS_WEAPON:
if (proto->SubClass >= MAX_ITEM_SUBCLASS_WEAPON)
return 0;
else
return item_weapon_skills[proto->SubClass];
case ITEM_CLASS_ARMOR:
if (proto->SubClass >= MAX_ITEM_SUBCLASS_ARMOR)
return 0;
else
return item_armor_skills[proto->SubClass];
default:
return 0;
}
return GetTemplate()->GetSkill();
}
uint32 Item::GetSpell()
+9 -9
View File
@@ -187,20 +187,20 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
if (!sScriptMgr->OnGossipSelect(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else if (go)
else if (go)
{
go->AI()->GossipSelect(_player, menuId, gossipListId);
if (!sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
_player->OnGossipSelect(go, gossipListId, menuId);
}
else if (item)
{
sScriptMgr->OnGossipSelect(_player, item, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
}
else
{
sScriptMgr->OnGossipSelect(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
}
else if (item)
{
sScriptMgr->OnGossipSelect(_player, item, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
}
else
{
sScriptMgr->OnGossipSelect(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
}
}
}
@@ -7,10 +7,13 @@ REWRITTEN FROM SCRATCH BY PUSSYWIZARD, IT OWNS NOW!
#include "trial_of_the_champion.h"
#include "Vehicle.h"
#include "Player.h"
#include "Group.h"
const Position SpawnPosition = {746.67f, 684.08f, 412.5f, 4.65f};
#define CLEANUP_CHECK_INTERVAL 5000
class Group;
class instance_trial_of_the_champion : public InstanceMapScript
{
public: