aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Chat/Chat.cpp13
-rw-r--r--src/server/game/Entities/Player/Player.cpp6
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp1
-rw-r--r--src/server/game/Spells/Spell.cpp1
-rw-r--r--src/server/game/Spells/SpellMgr.cpp13
5 files changed, 18 insertions, 16 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 0b18a04c5ca..f61380b6834 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -696,13 +696,12 @@ void ChatHandler::FillMessageData(WorldPacket* data, WorldSession* session, uint
*data << uint32(0); // 2.1.0
*data << uint32(speaker->GetName().size() + 1);
*data << speaker->GetName();
- uint64 listener_guid = 0;
- *data << uint64(listener_guid);
- if (listener_guid && !IS_PLAYER_GUID(listener_guid))
- {
- *data << uint32(1); // string listener_name_length
- *data << uint8(0); // string listener_name
- }
+ *data << uint64(0); // listener_guid
+ //if (listener_guid && !IS_PLAYER_GUID(listener_guid))
+ //{
+ // *data << uint32(1); // string listener_name_length
+ // *data << uint8(0); // string listener_name
+ //}
*data << uint32(messageLength);
*data << message;
*data << uint8(0);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 2ff86f81880..8f3379ee254 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -6878,10 +6878,8 @@ void Player::CheckAreaExploreAndOutdoor()
}
else if (diff > 5)
{
- int32 exploration_percent = (100-((diff-5)*5));
- if (exploration_percent > 100)
- exploration_percent = 100;
- else if (exploration_percent < 0)
+ int32 exploration_percent = 100 - ((diff - 5) * 5);
+ if (exploration_percent < 0)
exploration_percent = 0;
XP = uint32(sObjectMgr->GetBaseXP(areaEntry->area_level)*exploration_percent/100*sWorld->getRate(RATE_XP_EXPLORE));
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 149f422554a..d7b8003f19a 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -2411,6 +2411,7 @@ void UnitAura::FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster)
}
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
targetList.push_back(GetUnitOwner());
+ // no break
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
{
if (Unit* owner = GetUnitOwner()->GetCharmerOrOwner())
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 539b38bdac4..b502717178e 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -6129,6 +6129,7 @@ SpellCastResult Spell::CheckItems()
return SPELL_FAILED_DONT_REPORT;
}
}
+ // no break
case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC:
{
Item* targetItem = m_targets.GetItemTarget();
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index ebf7121eb54..e42d0f40998 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1236,7 +1236,7 @@ void SpellMgr::LoadSpellTalentRanks()
node.rank = rank + 1;
node.prev = prevSpell;
- node.next = node.rank < MAX_TALENT_RANK ? GetSpellInfo(talentInfo->RankID[rank + 1]) : NULL;
+ node.next = node.rank < MAX_TALENT_RANK ? GetSpellInfo(talentInfo->RankID[node.rank]) : NULL;
mSpellChains[spellId] = node;
mSpellInfoMap[spellId]->ChainEntry = &mSpellChains[spellId];
@@ -2782,6 +2782,9 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
{
uint32 enchantId = spellInfo->Effects[j].MiscValue;
SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId);
+ if (!enchant)
+ break;
+
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
{
if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
@@ -3769,10 +3772,10 @@ void SpellMgr::LoadSpellInfoCorrections()
}
}
- SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(121));
- properties->Type = SUMMON_TYPE_TOTEM;
- properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647)); // 52893
- properties->Type = SUMMON_TYPE_TOTEM;
+ if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(121)))
+ properties->Type = SUMMON_TYPE_TOTEM;
+ if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647))) // 52893
+ properties->Type = SUMMON_TYPE_TOTEM;
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded SpellInfo corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
}