This commit is contained in:
Ryan committed 2017-05-19 23:49:46 +01:00
commit 20726edec2
114 files changed
+955 -905

No files matched your search

+2 -2
View File
@@ -237,8 +237,8 @@ public:
Map2ZoneCoordinates(zoneX, zoneY, zoneId);
Map const* map = object->GetMap();
float groundZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
float floorZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
float groundZ = map->GetHeight(object->GetPhases(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
float floorZ = map->GetHeight(object->GetPhases(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
GridCoord gridCoord = Trinity::ComputeGridCoord(object->GetPositionX(), object->GetPositionY());
+28 -28
View File
@@ -96,22 +96,22 @@ public:
{ "gameobject_questender", rbac::RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTENDER, true, &HandleReloadGOQuestEnderCommand, "" },
{ "gameobject_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUEST_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesGameobjectCommand, "" },
{ "gameobject_queststarter", rbac::RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTSTARTER, true, &HandleReloadGOQuestStarterCommand, "" },
{ "gameobject_template_locale", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_GAMEOBJECT, true, &HandleReloadLocalesGameobjectCommand, "" },
{ "gm_tickets", rbac::RBAC_PERM_COMMAND_RELOAD_GM_TICKETS, true, &HandleReloadGMTicketsCommand, "" },
{ "gossip_menu", rbac::RBAC_PERM_COMMAND_RELOAD_GOSSIP_MENU, true, &HandleReloadGossipMenuCommand, "" },
{ "gossip_menu_option", rbac::RBAC_PERM_COMMAND_RELOAD_GOSSIP_MENU_OPTION, true, &HandleReloadGossipMenuOptionCommand, "" },
{ "item_enchantment_template", rbac::RBAC_PERM_COMMAND_RELOAD_ITEM_ENCHANTMENT_TEMPLATE, true, &HandleReloadItemEnchantementsCommand, "" },
{ "item_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_ITEM_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesItemCommand, "" },
{ "lfg_dungeon_rewards", rbac::RBAC_PERM_COMMAND_RELOAD_LFG_DUNGEON_REWARDS, true, &HandleReloadLfgRewardsCommand, "" },
{ "locales_achievement_reward", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_ACHIEVEMENT_REWARD, true, &HandleReloadLocalesAchievementRewardCommand, "" },
{ "locales_creature", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_CRETURE, true, &HandleReloadLocalesCreatureCommand, "" },
{ "locales_creature_text", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_CRETURE_TEXT, true, &HandleReloadLocalesCreatureTextCommand, "" },
{ "locales_gossip_menu_option", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_GOSSIP_MENU_OPTION, true, &HandleReloadLocalesGossipMenuOptionCommand, "" },
{ "locales_item", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_ITEM, true, &HandleReloadLocalesItemCommand, "" },
{ "locales_npc_text", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_NPC_TEXT, true, &HandleReloadLocalesNpcTextCommand, "" },
{ "locales_page_text", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_PAGE_TEXT, true, &HandleReloadLocalesPageTextCommand, "" },
{ "locales_points_of_interest", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_POINTS_OF_INTEREST, true, &HandleReloadLocalesPointsOfInterestCommand, "" },
{ "locales_quest", rbac::RBAC_PERM_COMMAND_RELOAD_LOCALES_QUEST, true, &HandleReloadLocalesQuestCommand, "" },
{ "achievement_reward_locale", rbac::RBAC_PERM_COMMAND_RELOAD_ACHIEVEMENT_REWARD_LOCALE, true, &HandleReloadLocalesAchievementRewardCommand, "" },
{ "creature_template_locale", rbac::RBAC_PERM_COMMAND_RELOAD_CRETURE_TEMPLATE_LOCALE, true, &HandleReloadLocalesCreatureCommand, "" },
{ "creature_text_locale", rbac::RBAC_PERM_COMMAND_RELOAD_CRETURE_TEXT_LOCALE, true, &HandleReloadLocalesCreatureTextCommand, "" },
{ "gameobject_template_locale", rbac::RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_TEMPLATE_LOCALE, true, &HandleReloadLocalesGameobjectCommand, "" },
{ "gossip_menu_option_locale", rbac::RBAC_PERM_COMMAND_RELOAD_GOSSIP_MENU_OPTION_LOCALE, true, &HandleReloadLocalesGossipMenuOptionCommand, "" },
{ "item_template_locale", rbac::RBAC_PERM_COMMAND_RELOAD_ITEM_TEMPLATE_LOCALE, true, &HandleReloadLocalesItemCommand, "" },
{ "npc_text_locale", rbac::RBAC_PERM_COMMAND_RELOAD_NPC_TEXT_LOCALE, true, &HandleReloadLocalesNpcTextCommand, "" },
{ "page_text_locale", rbac::RBAC_PERM_COMMAND_RELOAD_PAGE_TEXT_LOCALE, true, &HandleReloadLocalesPageTextCommand, "" },
{ "points_of_interest_locale", rbac::RBAC_PERM_COMMAND_RELOAD_POINTS_OF_INTEREST_LOCALE, true, &HandleReloadLocalesPointsOfInterestCommand, "" },
{ "quest_template_locale", rbac::RBAC_PERM_COMMAND_RELOAD_QUEST_TEMPLATE_LOCALE, true, &HandleReloadLocalesQuestCommand, "" },
{ "mail_level_reward", rbac::RBAC_PERM_COMMAND_RELOAD_MAIL_LEVEL_REWARD, true, &HandleReloadMailLevelRewardCommand, "" },
{ "mail_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_MAIL_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesMailCommand, "" },
{ "milling_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_MILLING_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesMillingCommand, "" },
@@ -978,9 +978,9 @@ public:
static bool HandleReloadLocalesAchievementRewardCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Achievement Reward Data...");
TC_LOG_INFO("misc", "Re-Loading Achievement Reward Data Locale...");
sAchievementMgr->LoadRewardLocales();
handler->SendGlobalGMSysMessage("DB table `locales_achievement_reward` reloaded.");
handler->SendGlobalGMSysMessage("DB table `achievement_reward_locale` reloaded.");
return true;
}
@@ -994,23 +994,23 @@ public:
static bool HandleReloadLocalesCreatureCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Creature ...");
TC_LOG_INFO("misc", "Re-Loading Creature Template Locale...");
sObjectMgr->LoadCreatureLocales();
handler->SendGlobalGMSysMessage("DB table `locales_creature` reloaded.");
handler->SendGlobalGMSysMessage("DB table `creature_template_locale` reloaded.");
return true;
}
static bool HandleReloadLocalesCreatureTextCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Creature Texts...");
TC_LOG_INFO("misc", "Re-Loading Creature Texts Locale...");
sCreatureTextMgr->LoadCreatureTextLocales();
handler->SendGlobalGMSysMessage("DB table `locales_creature_text` reloaded.");
handler->SendGlobalGMSysMessage("DB table `creature_text_locale` reloaded.");
return true;
}
static bool HandleReloadLocalesGameobjectCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Gameobject ... ");
TC_LOG_INFO("misc", "Re-Loading Gameobject Template Locale... ");
sObjectMgr->LoadGameObjectLocales();
handler->SendGlobalGMSysMessage("DB table `gameobject_template_locale` reloaded.");
return true;
@@ -1018,31 +1018,31 @@ public:
static bool HandleReloadLocalesGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Gossip Menu Option ... ");
TC_LOG_INFO("misc", "Re-Loading Gossip Menu Option Locale... ");
sObjectMgr->LoadGossipMenuItemsLocales();
handler->SendGlobalGMSysMessage("DB table `locales_gossip_menu_option` reloaded.");
handler->SendGlobalGMSysMessage("DB table `gossip_menu_option_locale` reloaded.");
return true;
}
static bool HandleReloadLocalesItemCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Item ... ");
TC_LOG_INFO("misc", "Re-Loading Item Template Locale... ");
sObjectMgr->LoadItemLocales();
handler->SendGlobalGMSysMessage("DB table `locales_item` reloaded.");
handler->SendGlobalGMSysMessage("DB table `item_template_locale` reloaded.");
return true;
}
static bool HandleReloadLocalesNpcTextCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales NPC Text ... ");
TC_LOG_INFO("misc", "Re-Loading NPC Text Locale... ");
sObjectMgr->LoadNpcTextLocales();
handler->SendGlobalGMSysMessage("DB table `locales_npc_text` reloaded.");
handler->SendGlobalGMSysMessage("DB table `npc_text_locale` reloaded.");
return true;
}
static bool HandleReloadLocalesPageTextCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Page Text ... ");
TC_LOG_INFO("misc", "Re-Loading Page Text Locale... ");
sObjectMgr->LoadPageTextLocales();
handler->SendGlobalGMSysMessage("DB table `locales_page_text` reloaded.");
return true;
@@ -1050,17 +1050,17 @@ public:
static bool HandleReloadLocalesPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Points Of Interest ... ");
TC_LOG_INFO("misc", "Re-Loading Points Of Interest Locale... ");
sObjectMgr->LoadPointOfInterestLocales();
handler->SendGlobalGMSysMessage("DB table `locales_points_of_interest` reloaded.");
handler->SendGlobalGMSysMessage("DB table `points_of_interest_locale` reloaded.");
return true;
}
static bool HandleReloadLocalesQuestCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Locales Quest ... ");
TC_LOG_INFO("misc", "Re-Loading Quest Template Locale... ");
sObjectMgr->LoadQuestLocales();
handler->SendGlobalGMSysMessage("DB table `locales_quest` reloaded.");
handler->SendGlobalGMSysMessage("DB table `quest_template_locale` reloaded.");
return true;
}
@@ -1172,7 +1172,7 @@ public:
float x, y, z;
me->GetPosition(x, y, z);
z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
z = me->GetMap()->GetHeight(me->GetPhases(), x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetPosition(x, y, z, 0);
}
@@ -1290,7 +1290,7 @@ public:
{
float x, y, z;
me->GetPosition(x, y, z);
z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
z = me->GetMap()->GetHeight(me->GetPhases(), x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetPosition(x, y, z, 0);
hyjal_trashAI::JustDied(killer);
@@ -541,7 +541,7 @@ public:
float x = caster->GetPositionX() + dist * std::cos(angle);
float y = caster->GetPositionY() + dist * std::sin(angle);
float z = caster->GetMap()->GetHeight(x, y, caster->GetPositionZ());
float z = caster->GetMap()->GetHeight(caster->GetPhases(), x, y, caster->GetPositionZ());
const_cast<WorldLocation*>(GetExplTargetDest())->Relocate(x, y, z);
GetHitDest()->Relocate(x, y, z);
@@ -268,7 +268,7 @@ class boss_high_priestess_azil : public CreatureScript
me->RemoveAurasDueToSpell(SPELL_EARTH_FURY_CASTING_VISUAL);
me->RemoveAurasDueToSpell(SPELL_EARTH_FURY_ENERGY_SHIELD);
Position pos = me->GetPosition();
pos.m_positionZ = me->GetMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
me->GetMotionMaster()->MovePoint(POINT_GROUND, pos);
break;
}
@@ -266,7 +266,7 @@ class boss_slabhide : public CreatureScript
case EVENT_LAND:
{
Position pos = me->GetPosition();
pos.m_positionZ = me->GetMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
me->GetMotionMaster()->MoveLand(POINT_SLABHIDE_LAND, pos);
break;
}
@@ -479,7 +479,7 @@ public:
{
Unit* caster = GetCaster();
Position pos = caster->GetPosition();
pos.m_positionZ = caster->GetMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 100.0f);
pos.m_positionZ = caster->GetMap()->GetHeight(caster->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 100.0f);
dest.Relocate(pos);
}
@@ -88,7 +88,7 @@ class boss_amanitar : public CreatureScript
for (uint8 i = 0; i < 30; ++i)
{
Position pos = me->GetRandomNearPosition(30.0f);
pos.m_positionZ = me->GetMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), MAX_HEIGHT) + 2.0f;
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), MAX_HEIGHT) + 2.0f;
if (Creature* trigger = me->SummonCreature(NPC_TRIGGER, pos))
{
@@ -626,7 +626,7 @@ class npc_frost_sphere : public CreatureScript
if (me->GetHealth() <= damage)
{
damage = 0;
float floorZ = me->GetMap()->GetHeight(me->GetPhaseMask(), me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
float floorZ = me->GetMap()->GetHeight(me->GetPhases(), me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
if (fabs(me->GetPositionZ() - floorZ) < 0.1f)
{
// we are close to the ground
@@ -805,7 +805,7 @@ class boss_prince_valanar_icc : public CreatureScript
{
float x, y, z;
summon->GetPosition(x, y, z);
float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseMask(), x, y, z, true, 500.0f);
float ground_Z = summon->GetMap()->GetHeight(summon->GetPhases(), x, y, z, true, 500.0f);
summon->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, x, y, ground_Z);
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
break;
@@ -1047,7 +1047,7 @@ class npc_kinetic_bomb : public CreatureScript
me->SetReactState(REACT_PASSIVE);
me->GetPosition(_x, _y, _groundZ);
me->DespawnOrUnsummon(60000);
_groundZ = me->GetMap()->GetHeight(me->GetPhaseMask(), _x, _y, _groundZ, true, 500.0f);
_groundZ = me->GetMap()->GetHeight(me->GetPhases(), _x, _y, _groundZ, true, 500.0f);
}
void DoAction(int32 action) override
@@ -2019,7 +2019,7 @@ class spell_svalna_revive_champion : public SpellScriptLoader
return;
Position pos = caster->GetNearPosition(5.0f, 0.0f);
//pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), caster->GetPositionZ(), true, 50.0f);
//pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), caster->GetPositionZ(), true, 50.0f);
//pos.m_positionZ += 0.05f;
caster->SetHomePosition(pos);
caster->GetMotionMaster()->MoveLand(POINT_LAND, pos);
@@ -777,7 +777,7 @@ class boss_flame_leviathan_safety_container : public CreatureScript
{
float x, y, z;
me->GetPosition(x, y, z);
z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
z = me->GetMap()->GetHeight(me->GetPhases(), x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetPosition(x, y, z, 0);
}
@@ -863,7 +863,7 @@ class boss_sara : public CreatureScript
float angle = frand(0.0f, 2.0f * float(M_PI));
pos.m_positionX = YoggSaronSpawnPos.GetPositionX() + radius * cosf(angle);
pos.m_positionY = YoggSaronSpawnPos.GetPositionY() + radius * sinf(angle);
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), YoggSaronSpawnPos.GetPositionZ() + 5.0f);
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), YoggSaronSpawnPos.GetPositionZ() + 5.0f);
me->SummonCreature(NPC_DEATH_RAY, pos, TEMPSUMMON_TIMED_DESPAWN, 20000);
}
break;
@@ -780,7 +780,7 @@ public:
bird->KillSelf();
crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(),
bird->GetMap()->GetWaterOrGroundLevel(bird->GetPhaseMask(), bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ()));
bird->GetMap()->GetWaterOrGroundLevel(bird->GetPhases(), bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ()));
/// @todo Make crunchy perform emote eat when he reaches the bird
break;
@@ -74,7 +74,7 @@ public:
void Reset() override
{
ground = me->GetMap()->GetHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZMinusOffset());
ground = me->GetMap()->GetHeight(me->GetPhases(), me->GetPositionX(), me->GetPositionY(), me->GetPositionZMinusOffset());
SummonInfernal();
events.ScheduleEvent(EVENT_CAST_SUMMON_INFERNAL, urand(1000, 3000));
}