*[8475] fixed some gcc-warnings Author: balrok

*[8476] Revert some recent cleanup changes, some other fixes and cleanups. Author: VladimirMangos
*[8489] Fixed player visibility update in case view point different from player itself. Author: SilverIce
*[8493] Avoid unexpected multiply error messages at wrong `quest_template`.`RewSpell*` Author: VladimirMangos
*[8496] Resolve some #include cycles and unsafe code.
* Common.h -> Threading.h -> Errors.h -> Common.h
* Remove reduncdent #include "ByteBuffer.h" in headers
* Remove redundent #include "Auth/BigNumber.h" in headers
* Avoid multyply data copy at use some now dropped functions in BigNumber.
* Avoid copy fixed byte count from byte arrays with unknown real size created from BigNumber.
* Avoid possible problems for build mangos at different platform or compilers. Author: VladimirMangos.
*[8501] Apply code style and cleanups to some Player functions. Author: VladimirMangos.
*[8502] Disable quests related to specific game events at startup if event not active. Also rename member boolean variable. Author: NoFantasy
*[8506] Add check for IsAutoComplete() in SendPreparedQuest().
For cases where quest is repeatable but has Method!=0, QuestDetails must be sent instead of RequestItems.
Some additional code cleanup. Author: NoFantasy
*[8507] Check amount of spawned pools before decrement to avoid unexpected result. Also rename variable to more meaningful name. Signed-off-by: NoFantasy <nofantasy@nf.no>

Thanks to Stryker and onkelz28!

--HG--
branch : trunk
This commit is contained in:
maximius committed 2009-09-18 14:10:37 -07:00
1 parent 0d9d400e79
commit 333f1c9d72
46 files changed
+201 -216

No files matched your search

+11 -13
View File
@@ -115,7 +115,7 @@ bool SpellClickInfo::IsFitToRequirements(Player const* player, Creature const *
if(questStart)
{
// not in expected required quest state
if(!player || (!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart))
if (!player || ((!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart)))
return false;
}
@@ -878,8 +878,8 @@ void ObjectMgr::ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const*
// replace by new structures array
const_cast<CreatureDataAddonAura*&>(addon->auras) = new CreatureDataAddonAura[val.size()/2+1];
int i=0;
for(uint32 j=0;j<val.size()/2;++j)
uint32 i=0;
for(uint32 j = 0; j < val.size()/2;++j)
{
CreatureDataAddonAura& cAura = const_cast<CreatureDataAddonAura&>(addon->auras[i]);
cAura.spell_id = (uint32)val[2*j+0];
@@ -1301,7 +1301,7 @@ void ObjectMgr::LoadCreatures()
if(heroicCreatures.find(data.id)!=heroicCreatures.end())
{
sLog.outErrorDb("Table `creature` have creature (GUID: %u) that listed as heroic template in `creature_template_substitution`, skipped.",guid,data.id );
sLog.outErrorDb("Table `creature` have creature (GUID: %u) that listed as heroic template (entry: %u) in `creature_template_substitution`, skipped.",guid,data.id );
continue;
}
@@ -3823,8 +3823,8 @@ void ObjectMgr::LoadQuests()
bool found = false;
for(uint8 k = 0; k < 3; ++k)
{
if( spellInfo->Effect[k]==SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->EffectMiscValue[k])==qinfo->QuestId ||
spellInfo->Effect[k]==SPELL_EFFECT_SEND_EVENT)
if ((spellInfo->Effect[k] == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->EffectMiscValue[k]) == qinfo->QuestId) ||
spellInfo->Effect[k] == SPELL_EFFECT_SEND_EVENT)
{
found = true;
break;
@@ -3980,19 +3980,18 @@ void ObjectMgr::LoadQuests()
qinfo->RewSpell = 0; // no spell reward will display for this quest
}
if(!SpellMgr::IsSpellValid(spellInfo))
else if(!SpellMgr::IsSpellValid(spellInfo))
{
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is broken, quest will not have a spell reward.",
qinfo->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
qinfo->RewSpell = 0; // no spell reward will display for this quest
}
if(GetTalentSpellCost(qinfo->RewSpell))
else if(GetTalentSpellCost(qinfo->RewSpell))
{
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is talent, quest will not have a spell reward.",
qinfo->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
qinfo->RewSpell = 0; // no spell reward will display for this quest
continue;
}
}
@@ -4007,19 +4006,18 @@ void ObjectMgr::LoadQuests()
qinfo->RewSpellCast = 0; // no spell will be casted on player
}
if(!SpellMgr::IsSpellValid(spellInfo))
else if(!SpellMgr::IsSpellValid(spellInfo))
{
sLog.outErrorDb("Quest %u has `RewSpellCast` = %u but spell %u is broken, quest will not have a spell reward.",
qinfo->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
qinfo->RewSpellCast = 0; // no spell will be casted on player
}
if(GetTalentSpellCost(qinfo->RewSpellCast))
else if(GetTalentSpellCost(qinfo->RewSpellCast))
{
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is talent, quest will not have a spell reward.",
qinfo->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
qinfo->RewSpellCast = 0; // no spell will be casted on player
continue;
}
}
@@ -7631,7 +7629,7 @@ bool PlayerCondition::Meets(Player const * player) const
case CONDITION_REPUTATION_RANK:
{
FactionEntry const* faction = sFactionStore.LookupEntry(value1);
return faction && player->GetReputationMgr().GetRank(faction) >= value2;
return faction && uint32(player->GetReputationMgr().GetRank(faction)) >= int32(value2);
}
case CONDITION_TEAM:
return player->GetTeam() == value1;