aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2011_12_14_01_gameobject_template.sql1
-rw-r--r--sql/updates/world/2011_12_16_00_world_creature_template.sql4
-rw-r--r--sql/updates/world/2011_12_16_00_world_spell_bonus_data.sql5
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp1
-rwxr-xr-xsrc/server/game/Chat/Commands/TicketCommands.cpp17
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp1
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp18
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp11
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp3
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/NPCHandler.cpp5
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp12
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp2
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp98
-rw-r--r--src/server/game/Spells/SpellInfo.cpp13
-rwxr-xr-xsrc/server/game/World/World.h2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp4
-rw-r--r--src/server/scripts/Outland/nagrand.cpp2
-rw-r--r--src/server/scripts/World/go_scripts.cpp28
-rw-r--r--src/server/scripts/World/npcs_special.cpp117
-rwxr-xr-xsrc/server/worldserver/CommandLine/CliRunnable.cpp2
-rwxr-xr-xsrc/server/worldserver/RemoteAccess/RASocket.cpp2
24 files changed, 260 insertions, 96 deletions
diff --git a/sql/updates/world/2011_12_14_01_gameobject_template.sql b/sql/updates/world/2011_12_14_01_gameobject_template.sql
new file mode 100644
index 00000000000..12729afd6b8
--- /dev/null
+++ b/sql/updates/world/2011_12_14_01_gameobject_template.sql
@@ -0,0 +1 @@
+UPDATE `gameobject_template` SET `scriptName` = 'go_ethereal_teleport_pad' WHERE `entry` = 184073; -- Update Ethereal Teleport Pad scriptname \ No newline at end of file
diff --git a/sql/updates/world/2011_12_16_00_world_creature_template.sql b/sql/updates/world/2011_12_16_00_world_creature_template.sql
new file mode 100644
index 00000000000..156fd431359
--- /dev/null
+++ b/sql/updates/world/2011_12_16_00_world_creature_template.sql
@@ -0,0 +1,4 @@
+-- Greater Fire Elemental script
+UPDATE `creature_template` SET `ScriptName`='npc_fire_elemental' WHERE `entry`=15438;
+-- Greater Earth Elemental script
+UPDATE `creature_template` SET `ScriptName`='npc_earth_elemental' WHERE `entry`=15352; \ No newline at end of file
diff --git a/sql/updates/world/2011_12_16_00_world_spell_bonus_data.sql b/sql/updates/world/2011_12_16_00_world_spell_bonus_data.sql
new file mode 100644
index 00000000000..3250bda4fdb
--- /dev/null
+++ b/sql/updates/world/2011_12_16_00_world_spell_bonus_data.sql
@@ -0,0 +1,5 @@
+-- Bounus coef for Greater Fire Elemental spells
+DELETE FROM `spell_bonus_data` WHERE `entry` IN (13376,57984);
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`,`ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+(13376,0.032,-1,-1,-1,'Greater Fire Elemental - Fire Shield'),
+(57984,0.4289,-1,-1,-1,'Greater Fire Elemental - Fire Blast'); \ No newline at end of file
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 06c1570ccd9..c5f04d4ff5f 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -543,7 +543,6 @@ bool npc_escortAI::GetWaypointPosition(uint32 pointId, float& x, float& y, float
if (waypoints.empty())
return false;
- ScriptPointVector::const_iterator itrEnd = waypoints.end();
for (ScriptPointVector::const_iterator itr = waypoints.begin(); itr != waypoints.end(); ++itr)
{
if (itr->uiPointId == pointId)
diff --git a/src/server/game/Chat/Commands/TicketCommands.cpp b/src/server/game/Chat/Commands/TicketCommands.cpp
index 559d2186ff7..d38da9eb97c 100755
--- a/src/server/game/Chat/Commands/TicketCommands.cpp
+++ b/src/server/game/Chat/Commands/TicketCommands.cpp
@@ -122,28 +122,29 @@ bool ChatHandler::HandleGMTicketCloseByIdCommand(const char* args)
return true;
}
- // Ticket must be assigned to player, who tries to close it.
- uint64 guid = m_session->GetPlayer()->GetGUID();
- if (ticket->IsAssignedNotTo(guid))
+ // Ticket should be assigned to the player who tries to close it.
+ // Console can override though
+ Player* player = m_session ? m_session->GetPlayer() : NULL;
+ if (player && ticket->IsAssignedNotTo(player->GetGUID()))
{
PSendSysMessage(LANG_COMMAND_TICKETCANNOTCLOSE, ticket->GetId());
return true;
}
- sTicketMgr->CloseTicket(ticket->GetId(), guid);
+ sTicketMgr->CloseTicket(ticket->GetId(), player ? player->GetGUID() : -1);
sTicketMgr->UpdateLastChange();
- std::string msg = ticket->FormatMessageString(*this, m_session->GetPlayer()->GetName(), NULL, NULL, NULL);
+ std::string msg = ticket->FormatMessageString(*this, player ? player->GetName() : "Console", NULL, NULL, NULL);
SendGlobalGMSysMessage(msg.c_str());
// Inform player, who submitted this ticket, that it is closed
- if (Player* player = ticket->GetPlayer())
+ if (Player* submitter = ticket->GetPlayer())
{
- if (player->IsInWorld())
+ if (submitter->IsInWorld())
{
WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
- player->GetSession()->SendPacket(&data);
+ submitter->GetSession()->SendPacket(&data);
}
}
return true;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 404fe24d467..f730363d0c6 100755
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -908,6 +908,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
SetCreateHealth(40*petlevel);
SetCreateMana(28 + 10*petlevel);
}
+ SetBonusDamage(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE) * 0.5f);
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel));
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
break;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 5a9a3d2c751..bd85968ca9a 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -13300,11 +13300,7 @@ void Player::UpdateSoulboundTradeItems()
// also checks for garbage data
for (ItemDurationList::iterator itr = m_itemSoulboundTradeable.begin(); itr != m_itemSoulboundTradeable.end();)
{
- if (!*itr)
- {
- m_itemSoulboundTradeable.erase(itr++);
- continue;
- }
+ ASSERT(*itr);
if ((*itr)->GetOwnerGUID() != GetGUID())
{
m_itemSoulboundTradeable.erase(itr++);
@@ -13319,16 +13315,10 @@ void Player::UpdateSoulboundTradeItems()
}
}
+//TODO: should never allow an item to be added to m_itemSoulboundTradeable twice
void Player::RemoveTradeableItem(Item* item)
{
- for (ItemDurationList::iterator itr = m_itemSoulboundTradeable.begin(); itr != m_itemSoulboundTradeable.end(); ++itr)
- {
- if ((*itr) == item)
- {
- m_itemSoulboundTradeable.erase(itr);
- break;
- }
- }
+ m_itemSoulboundTradeable.remove(item);
}
void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
@@ -18903,7 +18893,7 @@ void Player::_SaveSkills(SQLTransaction& trans)
void Player::_SaveSpells(SQLTransaction& trans)
{
- for (PlayerSpellMap::iterator itr = m_spells.begin(), next = m_spells.begin(); itr != m_spells.end();)
+ for (PlayerSpellMap::iterator itr = m_spells.begin(); itr != m_spells.end();)
{
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->state == PLAYERSPELL_CHANGED)
trans->PAppend("DELETE FROM character_spell WHERE guid = '%u' and spell = '%u'", GetGUIDLow(), itr->first);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 3a8000e48f3..5a7645bd513 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1926,12 +1926,7 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
CombatStart(victim);
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MELEE_ATTACK);
- uint32 hitInfo;
- if (attType == BASE_ATTACK)
- hitInfo = HITINFO_NORMALSWING2;
- else if (attType == OFF_ATTACK)
- hitInfo = HITINFO_LEFTSWING;
- else
+ if (attType != BASE_ATTACK && attType != OFF_ATTACK)
return; // ignore ranged case
// melee attack spell casted at main hand attack only - no normal melee dmg dealt
@@ -5474,7 +5469,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case CLASS_DRUID:
RandomSpells.push_back(71484);
RandomSpells.push_back(71485);
- RandomSpells.push_back(71486);
+ RandomSpells.push_back(71492);
break;
case CLASS_HUNTER:
RandomSpells.push_back(71486);
@@ -5520,7 +5515,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case CLASS_DRUID:
RandomSpells.push_back(71561);
RandomSpells.push_back(71556);
- RandomSpells.push_back(71558);
+ RandomSpells.push_back(71560);
break;
case CLASS_HUNTER:
RandomSpells.push_back(71558);
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 4e159209e86..020f7bd56a9 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -3818,11 +3818,11 @@ void ObjectMgr::LoadQuests()
// no changes, quest not dependent from this value but can have problems at client (note some may be 0, we must allow this so no check)
}
//check for proper RequiredSkillId value (skill case)
- if (int32 skill_id = SkillByQuestSort(-int32(qinfo->ZoneOrSort)))
+ if (uint32 skill_id = SkillByQuestSort(-int32(qinfo->ZoneOrSort)))
{
if (qinfo->RequiredSkillId != skill_id)
{
- sLog->outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%i).",
+ sLog->outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%d).",
qinfo->GetQuestId(), qinfo->ZoneOrSort, skill_id);
//override, and force proper value here?
}
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
index 5bd0a23207e..09af2303397 100755
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
@@ -47,11 +47,10 @@ template<>
void
RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
{
- float X, Y, Z, z, nx, ny, nz, ori, dist;
+ float X, Y, Z, nx, ny, nz, ori, dist;
creature.GetHomePosition(X, Y, Z, ori);
- z = creature.GetPositionZ();
Map const* map = creature.GetBaseMap();
// For 2D/3D system selection
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
index a675214930a..9c247655c3a 100755
--- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
@@ -878,19 +878,18 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
// reputation discount
float discountMod = _player->GetReputationPriceDiscount(unit);
- uint32 TotalCost = 0;
if (itemGUID)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID));
Item* item = _player->GetItemByGuid(itemGUID);
if (item)
- TotalCost = _player->DurabilityRepair(item->GetPos(), true, discountMod, guildBank);
+ _player->DurabilityRepair(item->GetPos(), true, discountMod, guildBank);
}
else
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
- TotalCost = _player->DurabilityRepairAll(true, discountMod, guildBank);
+ _player->DurabilityRepairAll(true, discountMod, guildBank);
}
}
diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
index a931d8a5b3d..2e9b88bd3f0 100755
--- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
@@ -311,21 +311,17 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
uint64 ownerguid = 0;
uint32 type;
std::string name = "NO_NAME_FOR_GUID";
- uint8 signs = 0;
- QueryResult result = CharacterDatabase.PQuery(
- "SELECT ownerguid, name, "
- " (SELECT COUNT(playerguid) FROM petition_sign WHERE petition_sign.petitionguid = '%u') AS signs, "
- " type "
- "FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid), GUID_LOPART(petitionguid));
+ // TODO: Use CHAR_LOAD_PETITION PS
+ QueryResult result = CharacterDatabase.PQuery("SELECT ownerguid, name, type "
+ "FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
if (result)
{
Field* fields = result->Fetch();
ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
name = fields[1].GetString();
- signs = fields[2].GetUInt8();
- type = fields[3].GetUInt32();
+ type = fields[2].GetUInt32();
}
else
{
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index ed35bff1f66..71122775492 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1518,7 +1518,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
spellId3 = 47180;
break;
}
- target->CastSpell(target, spellId, true, NULL, this);
+ target->CastSpell(target, spellId3, true, NULL, this);
}
// Master Shapeshifter - Cat
if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 839a466f0f0..97332436f09 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -606,57 +606,67 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
case SPELLFAMILY_ROGUE:
{
// Envenom
- if (m_caster->GetTypeId() == TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags[1] & 0x8))
+ if (m_spellInfo->SpellFamilyFlags[1] & 0x00000008)
{
- // consume from stack dozes not more that have combo-points
- if (uint32 combo = m_caster->ToPlayer()->GetComboPoints())
+ if (Player* player = m_caster->ToPlayer())
{
- // Lookup for Deadly poison (only attacker applied)
- if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0, 0, m_caster->GetGUID()))
+ // consume from stack dozes not more that have combo-points
+ if (uint32 combo = player->GetComboPoints())
{
- // count consumed deadly poison doses at target
- bool needConsume = true;
- uint32 spellId = aurEff->GetId();
- uint32 doses = aurEff->GetBase()->GetStackAmount();
- if (doses > combo)
- doses = combo;
- // Master Poisoner
- Unit::AuraEffectList const& auraList = m_caster->ToPlayer()->GetAuraEffectsByType(SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK);
- for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
+ // Lookup for Deadly poison (only attacker applied)
+ if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00010000, 0, 0, m_caster->GetGUID()))
{
- if ((*iter)->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_ROGUE && (*iter)->GetSpellInfo()->SpellIconID == 1960)
+ // count consumed deadly poison doses at target
+ bool needConsume = true;
+ uint32 spellId = aurEff->GetId();
+
+ uint32 doses = aurEff->GetBase()->GetStackAmount();
+ if (doses > combo)
+ doses = combo;
+
+ // Master Poisoner
+ Unit::AuraEffectList const& auraList = player->GetAuraEffectsByType(SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK);
+ for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
{
- uint32 chance = (*iter)->GetSpellInfo()->Effects[EFFECT_2].CalcValue(m_caster);
+ if ((*iter)->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_ROGUE && (*iter)->GetSpellInfo()->SpellIconID == 1960)
+ {
+ uint32 chance = (*iter)->GetSpellInfo()->Effects[EFFECT_2].CalcValue(m_caster);
- if (chance && roll_chance_i(chance))
- needConsume = false;
+ if (chance && roll_chance_i(chance))
+ needConsume = false;
- break;
+ break;
+ }
}
+
+ if (needConsume)
+ for (uint32 i = 0; i < doses; ++i)
+ unitTarget->RemoveAuraFromStack(spellId);
+
+ damage *= doses;
+ damage += int32(player->GetTotalAttackPowerValue(BASE_ATTACK) * 0.09f * combo);
}
- if (needConsume)
- for (uint32 i = 0; i < doses; ++i)
- unitTarget->RemoveAuraFromStack(spellId);
- damage *= doses;
- damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.09f * doses);
+ // Eviscerate and Envenom Bonus Damage (item set effect)
+ if (m_caster->HasAura(37169))
+ damage += combo * 40;
}
- // Eviscerate and Envenom Bonus Damage (item set effect)
- if (m_caster->HasAura(37169))
- damage += ((Player*)m_caster)->GetComboPoints()*40;
}
}
// Eviscerate
- else if ((m_spellInfo->SpellFamilyFlags[0] & 0x00020000) && m_caster->GetTypeId() == TYPEID_PLAYER)
+ else if (m_spellInfo->SpellFamilyFlags[0] & 0x00020000)
{
- if (uint32 combo = ((Player*)m_caster)->GetComboPoints())
+ if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
- float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
- damage += irand(int32(ap * combo * 0.03f), int32(ap * combo * 0.07f));
+ if (uint32 combo = ((Player*)m_caster)->GetComboPoints())
+ {
+ float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
+ damage += irand(int32(ap * combo * 0.03f), int32(ap * combo * 0.07f));
- // Eviscerate and Envenom Bonus Damage (item set effect)
- if (m_caster->HasAura(37169))
- damage += combo*40;
+ // Eviscerate and Envenom Bonus Damage (item set effect)
+ if (m_caster->HasAura(37169))
+ damage += combo*40;
+ }
}
}
break;
@@ -6234,9 +6244,13 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
if (!unitTarget)
return;
- float x, y, z;
- unitTarget->GetContactPoint(m_caster, x, y, z);
- m_caster->GetMotionMaster()->MoveCharge(x, y, z);
+ float angle = unitTarget->GetRelativeAngle(m_caster);
+ Position pos;
+
+ unitTarget->GetContactPoint(m_caster, pos.m_positionX, pos.m_positionY, pos.m_positionZ);
+ unitTarget->GetFirstCollisionPosition(pos, unitTarget->GetObjectSize(), angle);
+
+ m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ + unitTarget->GetObjectSize());
}
if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT_TARGET)
@@ -6257,9 +6271,13 @@ void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/)
if (m_targets.HasDst())
{
- float x, y, z;
- m_targets.GetDst()->GetPosition(x, y, z);
- m_caster->GetMotionMaster()->MoveCharge(x, y, z);
+ Position pos;
+ m_targets.GetDst()->GetPosition(&pos);
+ float angle = m_caster->GetRelativeAngle(pos.GetPositionX(), pos.GetPositionY());
+ float dist = m_caster->GetDistance(pos);
+ m_caster->GetFirstCollisionPosition(pos, dist, angle);
+
+ m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ);
}
}
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 972276c7d26..463b46972fa 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -2304,6 +2304,19 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
if (Id == 30708)
return false;
break;
+ case SPELLFAMILY_ROGUE:
+ switch (Id)
+ {
+ // Envenom must be considered as a positive effect even though it deals damage
+ case 32645: // Envenom (Rank 1)
+ case 32684: // Envenom (Rank 2)
+ case 57992: // Envenom (Rank 3)
+ case 57993: // Envenom (Rank 4)
+ return true;
+ default:
+ break;
+ }
+ break;
default:
break;
}
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 4c5c2596fa0..9354c14f51c 100755
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -635,7 +635,7 @@ class World
/// Are we in the middle of a shutdown?
bool IsShuttingDown() const { return m_ShutdownTimer > 0; }
- uint32 const GetShutDownTimeLeft() { return m_ShutdownTimer; }
+ uint32 GetShutDownTimeLeft() const { return m_ShutdownTimer; }
void ShutdownServ(uint32 time, uint32 options, uint8 exitcode);
void ShutdownCancel();
void ShutdownMsg(bool show = false, Player* player = NULL);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 82f16dd7784..7cbb1b91755 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -582,7 +582,7 @@ public:
{
Unit* pJaina = GetClosestCreatureWithEntry(me, NPC_JAINA, 50.0f);
if (!pJaina)
- pJaina = pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
+ pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
if (pJaina)
uiJainaGUID = pJaina->GetGUID();
bStepping = false;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index 877971aa502..13c174a9607 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -590,7 +590,7 @@ class boss_freya : public CreatureScript
waveCount++;
}
- void JustDied(Unit* who)
+ void JustDied(Unit* /*who*/)
{
//! Freya's chest is dynamically spawned on death by different spells.
const uint32 summonSpell[2][4] =
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
index 4f837870612..5965c352975 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
@@ -303,9 +303,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
if (resetcheck_timer <= diff)
{
- uint32 tempx, tempy;
- tempx = uint32(me->GetPositionX());
- tempy = uint32(me->GetPositionY());
+ uint32 tempx = uint32(me->GetPositionX());
if (tempx > 255 || tempx < 205)
{
EnterEvadeMode();
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index c556253ecf1..bae3aa65b98 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -573,7 +573,7 @@ public:
{
Talk(SAY_KUR_MORE);
- if (Creature* temp = me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0], kurenaiAmbushB[1], kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
+ if (me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0], kurenaiAmbushB[1], kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
Talk(SAY_KUR_MORE_TWO);
me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0]-2.5f, kurenaiAmbushB[1]-2.5f, kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 3bb969977b6..44c3ab9bdc9 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -47,6 +47,7 @@ go_jotunheim_cage
go_table_theka
go_soulwell
go_bashir_crystalforge
+go_ethereal_teleport_pad
EndContentData */
#include "ScriptPCH.h"
@@ -922,6 +923,32 @@ public:
};
/*######
+## go_ethereal_teleport_pad
+######*/
+
+enum eEtherealTeleportPad
+{
+ NPC_IMAGE_WIND_TRADER = 20518,
+ ITEM_TELEPORTER_POWER_PACK = 28969,
+};
+
+class go_ethereal_teleport_pad : public GameObjectScript
+{
+public:
+ go_ethereal_teleport_pad() : GameObjectScript("go_ethereal_teleport_pad") { }
+
+ bool OnGossipHello(Player* player, GameObject* pGO)
+ {
+ if (!player->HasItemCount(ITEM_TELEPORTER_POWER_PACK, 1))
+ return false;
+
+ pGO->SummonCreature(NPC_IMAGE_WIND_TRADER, pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
+
+ return true;
+ }
+};
+
+/*######
## go_soulwell
######*/
@@ -1282,6 +1309,7 @@ void AddSC_go_scripts()
new go_jotunheim_cage;
new go_table_theka;
new go_inconspicuous_landmark;
+ new go_ethereal_teleport_pad;
new go_soulwell;
new go_tadpole_cage;
new go_dragonflayer_cage;
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index a5e5b467fc7..6ea25149734 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2164,6 +2164,121 @@ public:
};
/*######
+# npc_fire_elemental
+######*/
+#define SPELL_FIRENOVA 12470
+#define SPELL_FIRESHIELD 13376
+#define SPELL_FIREBLAST 57984
+
+class npc_fire_elemental : public CreatureScript
+{
+public:
+ npc_fire_elemental() : CreatureScript("npc_fire_elemental") { }
+
+ struct npc_fire_elementalAI : public ScriptedAI
+ {
+ npc_fire_elementalAI(Creature* creature) : ScriptedAI(creature) {}
+
+ uint32 FireNova_Timer;
+ uint32 FireShield_Timer;
+ uint32 FireBlast_Timer;
+
+ void Reset()
+ {
+ FireNova_Timer = 5000 + rand() % 15000; // 5-20 sec cd
+ FireBlast_Timer = 5000 + rand() % 15000; // 5-20 sec cd
+ FireShield_Timer = 0;
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (me->HasUnitState(UNIT_STAT_CASTING))
+ return;
+
+ if (FireShield_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_FIRESHIELD);
+ FireShield_Timer = 2 * IN_MILLISECONDS;
+ }
+ else
+ FireShield_Timer -= diff;
+
+ if (FireBlast_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_FIREBLAST);
+ FireBlast_Timer = 5000 + rand() % 15000; // 5-20 sec cd
+ }
+ else
+ FireBlast_Timer -= diff;
+
+ if (FireNova_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_FIRENOVA);
+ FireNova_Timer = 5000 + rand() % 15000; // 5-20 sec cd
+ }
+ else
+ FireNova_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI *GetAI(Creature* creature) const
+ {
+ return new npc_fire_elementalAI(creature);
+ }
+};
+
+/*######
+# npc_earth_elemental
+######*/
+#define SPELL_ANGEREDEARTH 36213
+
+class npc_earth_elemental : public CreatureScript
+{
+public:
+ npc_earth_elemental() : CreatureScript("npc_earth_elemental") { }
+
+ struct npc_earth_elementalAI : public ScriptedAI
+ {
+ npc_earth_elementalAI(Creature* creature) : ScriptedAI(creature) {}
+
+ uint32 AngeredEarth_Timer;
+
+ void Reset()
+ {
+ AngeredEarth_Timer = 0;
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (AngeredEarth_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_ANGEREDEARTH);
+ AngeredEarth_Timer = 5000 + rand() % 15000; // 5-20 sec cd
+ }
+ else
+ AngeredEarth_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI *GetAI(Creature* creature) const
+ {
+ return new npc_earth_elementalAI(creature);
+ }
+};
+
+/*######
# npc_wormhole
######*/
@@ -2673,5 +2788,7 @@ void AddSC_npcs_special()
new npc_locksmith;
new npc_tabard_vendor;
new npc_experience;
+ new npc_fire_elemental;
+ new npc_earth_elemental;
}
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index 564f6028eca..61352521d9f 100755
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -104,7 +104,7 @@ void utf8print(void* /*arg*/, const char* str)
printf(temp_buf);
#else
{
- printf(str);
+ printf("%s", str);
fflush(stdout);
}
#endif
diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp
index 71d4d1df035..82238ee54bc 100755
--- a/src/server/worldserver/RemoteAccess/RASocket.cpp
+++ b/src/server/worldserver/RemoteAccess/RASocket.cpp
@@ -286,7 +286,7 @@ int RASocket::subnegotiate()
if (n >= 1024)
{
- sLog->outRemote("RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", n);
+ sLog->outRemote("RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", uint32(n));
return -1;
}