Merge branch 'master' into 4.3.4
Conflicts: src/server/game/Entities/Player/Player.cpp src/server/scripts/Kalimdor/zone_feralas.cpp
This commit is contained in:
commit
5193eaac87
25 files changed
+1991
-32
No files matched your search
@@ -123,6 +123,9 @@ int main(int argc, char** argv)
|
||||
|
||||
// Set signal handlers
|
||||
boost::asio::signal_set signals(_ioService, SIGINT, SIGTERM);
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
signals.add(SIGBREAK);
|
||||
#endif
|
||||
signals.async_wait(SignalHandler);
|
||||
|
||||
// Set process priority according to configuration settings
|
||||
@@ -191,18 +194,10 @@ void StopDB()
|
||||
MySQL::Library_End();
|
||||
}
|
||||
|
||||
void SignalHandler(const boost::system::error_code& error, int signalNumber)
|
||||
void SignalHandler(const boost::system::error_code& error, int /*signalNumber*/)
|
||||
{
|
||||
if (!error)
|
||||
{
|
||||
switch (signalNumber)
|
||||
{
|
||||
case SIGINT:
|
||||
case SIGTERM:
|
||||
_ioService.stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
_ioService.stop();
|
||||
}
|
||||
|
||||
void KeepDatabaseAliveHandler(const boost::system::error_code& error)
|
||||
|
||||
@@ -23641,6 +23641,8 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank)
|
||||
skillValue = maxValue;
|
||||
else if (getClass() == CLASS_DEATH_KNIGHT)
|
||||
skillValue = std::min(std::max<uint16>({ 1, uint16((getLevel() - 1) * 5) }), maxValue);
|
||||
else if (skillId == SKILL_FIST_WEAPONS)
|
||||
skillValue = std::max<uint16>(1, GetSkillValue(SKILL_UNARMED));
|
||||
|
||||
SetSkill(skillId, 0, skillValue, maxValue);
|
||||
break;
|
||||
@@ -25610,6 +25612,9 @@ void Player::_LoadSkills(PreparedQueryResult result)
|
||||
uint16 field = count / 2;
|
||||
uint8 offset = count & 1;
|
||||
|
||||
if (HasSkill(SKILL_FIST_WEAPONS))
|
||||
SetSkill(SKILL_FIST_WEAPONS, 0, GetSkillValue(SKILL_UNARMED), GetMaxSkillValueForLevel());
|
||||
|
||||
SetUInt16Value(PLAYER_SKILL_LINEID_0 + field, offset, 0);
|
||||
SetUInt16Value(PLAYER_SKILL_STEP_0 + field, offset, 0);
|
||||
SetUInt16Value(PLAYER_SKILL_RANK_0 + field, offset, 0);
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace Trinity
|
||||
|
||||
inline bool IsValidMapCoord(float c)
|
||||
{
|
||||
return finite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5f);
|
||||
return std::isfinite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5f);
|
||||
}
|
||||
|
||||
inline bool IsValidMapCoord(float x, float y)
|
||||
@@ -226,12 +226,12 @@ namespace Trinity
|
||||
|
||||
inline bool IsValidMapCoord(float x, float y, float z)
|
||||
{
|
||||
return IsValidMapCoord(x, y) && finite(z);
|
||||
return IsValidMapCoord(x, y) && std::isfinite(z);
|
||||
}
|
||||
|
||||
inline bool IsValidMapCoord(float x, float y, float z, float o)
|
||||
{
|
||||
return IsValidMapCoord(x, y, z) && finite(o);
|
||||
return IsValidMapCoord(x, y, z) && std::isfinite(o);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -5469,7 +5469,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
||||
if (GetSpellInfo()->SpellFamilyFlags[0] & 0x20)
|
||||
{
|
||||
if (caster)
|
||||
caster->CastCustomSpell(target, 52212, &m_amount, NULL, NULL, true, 0, this);
|
||||
target->CastCustomSpell(target, 52212, &m_amount, NULL, NULL, true, 0, this, caster->GetGUID());
|
||||
break;
|
||||
}
|
||||
// Blood of the North
|
||||
|
||||
@@ -838,12 +838,16 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
case 52349: // Overtake
|
||||
unitTarget->CastCustomSpell(unitTarget, spellInfo->Id, &damage, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
case 72299: // Malleable Goo Summon Trigger
|
||||
unitTarget->CastSpell(unitTarget, spellInfo->Id, true, NULL, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case 72298: // Malleable Goo Summon
|
||||
unitTarget->CastSpell(unitTarget, spellInfo->Id, true, NULL, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
|
||||
CustomSpellValues values;
|
||||
// set basepoints for trigger with value effect
|
||||
if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_FORCE_CAST_WITH_VALUE)
|
||||
|
||||
@@ -143,7 +143,8 @@ public:
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_SUBTERFUGE) == QUEST_STATUS_COMPLETE &&
|
||||
!player->GetQuestRewardStatus(QUEST_IN_DREAMS) && !player->HasAura(SPELL_SCARLET_ILLUSION))
|
||||
player->GetQuestStatus(QUEST_IN_DREAMS) != QUEST_STATUS_COMPLETE &&
|
||||
!player->HasAura(SPELL_SCARLET_ILLUSION))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ILLUSION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(4773, creature->GetGUID());
|
||||
|
||||
@@ -142,6 +142,10 @@ enum CreaturesIds
|
||||
NPC_GARROSH_HELLSCREAM = 39372,
|
||||
NPC_KING_VARIAN_WRYNN = 39371,
|
||||
NPC_DEATHBOUND_WARD = 37007,
|
||||
NPC_LADY_JAINA_PROUDMOORE_QUEST = 38606,
|
||||
NPC_MURADIN_BRONZEBEARD_QUEST = 38607,
|
||||
NPC_UTHER_THE_LIGHTBRINGER_QUEST = 38608,
|
||||
NPC_LADY_SYLVANAS_WINDRUNNER_QUEST = 38609,
|
||||
|
||||
// Weekly quests
|
||||
NPC_INFILTRATOR_MINCHAR = 38471,
|
||||
|
||||
@@ -100,6 +100,12 @@ WeeklyQuest const WeeklyQuestData[WeeklyNPCs] =
|
||||
{NPC_VALITHRIA_DREAMWALKER_QUEST, {QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10, QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25}} // Respite for a Tormented Soul
|
||||
};
|
||||
|
||||
// NPCs spawned at Light's Hammer on Lich King dead
|
||||
Position const JainaSpawnPos = { -48.65278f, 2211.026f, 27.98586f, 3.124139f };
|
||||
Position const MuradinSpawnPos = { -47.34549f, 2208.087f, 27.98586f, 3.106686f };
|
||||
Position const UtherSpawnPos = { -26.58507f, 2211.524f, 30.19898f, 3.124139f };
|
||||
Position const SylvanasSpawnPos = { -41.45833f, 2222.891f, 27.98586f, 3.647738f };
|
||||
|
||||
class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -932,6 +938,11 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
pillars->SetRespawnTime(7 * DAY);
|
||||
if (GameObject* pillars = instance->GetGameObject(PillarsUnchainedGUID))
|
||||
pillars->SetRespawnTime(7 * DAY);
|
||||
|
||||
instance->SummonCreature(NPC_LADY_JAINA_PROUDMOORE_QUEST, JainaSpawnPos);
|
||||
instance->SummonCreature(NPC_MURADIN_BRONZEBEARD_QUEST, MuradinSpawnPos);
|
||||
instance->SummonCreature(NPC_UTHER_THE_LIGHTBRINGER_QUEST, UtherSpawnPos);
|
||||
instance->SummonCreature(NPC_LADY_SYLVANAS_WINDRUNNER_QUEST, SylvanasSpawnPos);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
#define snprintf _snprintf
|
||||
#define atoll _atoi64
|
||||
#define vsnprintf _vsnprintf
|
||||
#define finite(X) _finite(X)
|
||||
#define llabs _abs64
|
||||
|
||||
#else
|
||||
@@ -111,7 +110,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
inline float finiteAlways(float f) { return finite(f) ? f : 0.0f; }
|
||||
inline float finiteAlways(float f) { return std::isfinite(f) ? f : 0.0f; }
|
||||
|
||||
#define STRINGIZE(a) #a
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
|
||||
void SetProcessPriority(const std::string logChannel)
|
||||
{
|
||||
// Suppresses Mac OS X Warning since logChannel isn't used.
|
||||
#if PLATFORM_APPLE
|
||||
(void)logChannel;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__linux__)
|
||||
|
||||
///- Handle affinity for multiple processors and process priority
|
||||
|
||||
@@ -155,7 +155,7 @@ endif()
|
||||
|
||||
add_dependencies(worldserver revision.h)
|
||||
|
||||
if( UNIX AND NOT NOJEM )
|
||||
if( UNIX AND NOT NOJEM AND NOT APPLE )
|
||||
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -158,6 +158,9 @@ extern int main(int argc, char** argv)
|
||||
|
||||
// Set signal handlers (this must be done before starting io_service threads, because otherwise they would unblock and exit)
|
||||
boost::asio::signal_set signals(_ioService, SIGINT, SIGTERM);
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
signals.add(SIGBREAK);
|
||||
#endif
|
||||
signals.async_wait(SignalHandler);
|
||||
|
||||
// Start the Boost based thread pool
|
||||
@@ -367,18 +370,10 @@ void WorldUpdateLoop()
|
||||
}
|
||||
}
|
||||
|
||||
void SignalHandler(const boost::system::error_code& error, int signalNumber)
|
||||
void SignalHandler(const boost::system::error_code& error, int /*signalNumber*/)
|
||||
{
|
||||
if (!error)
|
||||
{
|
||||
switch (signalNumber)
|
||||
{
|
||||
case SIGINT:
|
||||
case SIGTERM:
|
||||
World::StopNow(SHUTDOWN_EXIT_CODE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
World::StopNow(SHUTDOWN_EXIT_CODE);
|
||||
}
|
||||
|
||||
void FreezeDetectorHandler(const boost::system::error_code& error)
|
||||
@@ -540,6 +535,9 @@ void ClearOnlineAccounts()
|
||||
|
||||
variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile, std::string& configService)
|
||||
{
|
||||
// Silences warning about configService not be used if the OS is not Windows
|
||||
(void)configService;
|
||||
|
||||
options_description all("Allowed options");
|
||||
all.add_options()
|
||||
("help,h", "print usage message")
|
||||
|
||||
Reference in new issue
Block a user