Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_00_world_spell_script_names.sql
	sql/updates/world/2013_07_24_00_world_spell_script_names.sql
	sql/updates/world/2013_07_24_00_world_spell_script_names_335.sql
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Achievements/AchievementMgr.h
	src/server/game/Battlegrounds/ArenaTeamMgr.cpp
	src/server/game/Chat/ChatLink.cpp
	src/server/game/DataStores/DBCStores.cpp
	src/server/game/DataStores/DBCStructure.h
	src/server/game/DataStores/DBCfmt.h
	src/server/game/Entities/DynamicObject/DynamicObject.h
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/StatSystem.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Entities/Unit/Unit.h
	src/server/game/Groups/Group.cpp
	src/server/game/Handlers/QuestHandler.cpp
	src/server/game/Miscellaneous/SharedDefines.h
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/game/World/World.h
	src/server/scripts/Commands/cs_character.cpp
	src/server/scripts/Commands/cs_lookup.cpp
	src/server/scripts/Commands/cs_titles.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
	src/server/scripts/Kalimdor/zone_darkshore.cpp
	src/server/scripts/Kalimdor/zone_mulgore.cpp
	src/server/scripts/Kalimdor/zone_tanaris.cpp
	src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_mage.cpp
	src/server/scripts/Spells/spell_rogue.cpp
	src/server/shared/Database/Implementation/CharacterDatabase.cpp
	src/server/shared/Database/Implementation/CharacterDatabase.h
	src/tools/vmap4_extractor/mpq_libmpq04.h
This commit is contained in:
Vincent-Michael committed 2014-04-05 20:43:05 +02:00
commit e4b14b943d
1018 files changed
+106417 -3858

No files matched your search

+51 -11
View File
@@ -4255,10 +4255,13 @@ uint32 Unit::GetDoTsByCaster(uint64 casterGUID) const
int32 Unit::GetTotalAuraModifier(AuraType auratype) const
{
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
if (mTotalAuraList.empty())
return 0;
std::map<SpellGroup, int32> SameEffectSpellGroup;
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
if (!sSpellMgr->AddSameEffectStackRuleSpellGroups((*i)->GetSpellInfo(), (*i)->GetAmount(), SameEffectSpellGroup))
modifier += (*i)->GetAmount();
@@ -7280,7 +7283,7 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const
Player const* targetPlayerOwner = target->GetAffectingPlayer();
// check forced reputation to support SPELL_AURA_FORCE_REACTION
if (selfPlayerOwner)
if (selfPlayerOwner)
{
if (FactionTemplateEntry const* targetFactionTemplateEntry = target->GetFactionTemplateEntry())
if (ReputationRank const* repRank = selfPlayerOwner->GetReputationMgr().GetForcedRankIfAny(targetFactionTemplateEntry))
@@ -11245,6 +11248,8 @@ float Unit::GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spell
return 0;
if (spellInfo->RangeEntry->maxRangeFriend == spellInfo->RangeEntry->maxRangeHostile)
return spellInfo->GetMaxRange();
if (target == NULL)
return spellInfo->GetMaxRange(true);
return spellInfo->GetMaxRange(!IsHostileTo(target));
}
@@ -13486,8 +13491,10 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
data << uint64(victim->GetGUID()); // victim
Player* looter = player;
Group* group = player->GetGroup();
bool hasLooterGuid = false;
if (Group* group = player->GetGroup())
if (group)
{
group->BroadcastPacket(&data, group->GetMemberGroup(player->GetGUID()));
@@ -13499,16 +13506,10 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
looter = ObjectAccessor::FindPlayer(group->GetLooterGuid());
if (looter)
{
hasLooterGuid = true;
creature->SetLootRecipient(looter); // update creature loot recipient to the allowed looter.
group->SendLooter(creature, looter);
}
else
group->SendLooter(creature, NULL);
}
else
group->SendLooter(creature, NULL);
group->UpdateLooterGuid(creature);
}
}
else
@@ -13525,6 +13526,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
}
}
// Generate loot before updating looter
if (creature)
{
Loot* loot = &creature->loot;
@@ -13536,6 +13538,18 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
loot->FillLoot(lootid, LootTemplates_Creature, looter, false, false, creature->GetLootMode());
loot->generateMoneyLoot(creature->GetCreatureTemplate()->mingold, creature->GetCreatureTemplate()->maxgold);
if (group)
{
if (hasLooterGuid)
group->SendLooter(creature, looter);
else
group->SendLooter(creature, NULL);
// Update round robin looter only if the creature had loot
if (!creature->loot.empty())
group->UpdateLooterGuid(creature);
}
}
player->RewardPlayerAndGroupAtKill(victim, false);
@@ -15938,7 +15952,12 @@ bool CharmInfo::IsCommandFollow()
void CharmInfo::SaveStayPosition()
{
//! At this point a new spline destination is enabled because of Unit::StopMoving()
G3D::Vector3 const stayPos = _unit->movespline->FinalDestination();
G3D::Vector3 stayPos = _unit->movespline->FinalDestination();
if (_unit->movespline->onTransport)
if (TransportBase* transport = _unit->GetDirectTransport())
transport->CalculatePassengerPosition(stayPos.x, stayPos.y, stayPos.z);
_stayX = stayPos.x;
_stayY = stayPos.y;
_stayZ = stayPos.z;
@@ -16413,3 +16432,24 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
updateMask.AppendToPacket(data);
data->append(fieldBuffer);
}
void Unit::BuildCooldownPacket(WorldPacket& data, uint8 flags, uint32 spellId, uint32 cooldown)
{
data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + 4 + 4);
data << uint64(GetGUID());
data << uint8(flags);
data << uint32(spellId);
data << uint32(cooldown);
}
void Unit::BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCooldowns const& cooldowns)
{
data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + (4 + 4) * cooldowns.size());
data << uint64(GetGUID());
data << uint8(flags);
for (UNORDERED_MAP<uint32, uint32>::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr)
{
data << uint32(itr->first);
data << uint32(itr->second);
}
}