mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Various Cleanups (game S)
This commit is contained in:
parent
865f7d7428
commit
08fd085549
18 changed files with 3168 additions and 3146 deletions
|
|
@ -630,7 +630,8 @@ void ScriptMgr::LoadScripts(ScriptMapMapName& scripts, const char* tablename)
|
|||
scripts.second[tmp.id].insert(ScriptMap::value_type(tmp.delay, tmp));
|
||||
|
||||
++count;
|
||||
} while(result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -1694,7 +1695,8 @@ void ScriptMgr::LoadAreaTriggerScripts()
|
|||
}
|
||||
|
||||
m_AreaTriggerScripts[triggerId] = GetScriptId(scriptName);
|
||||
} while(result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -1794,7 +1796,8 @@ void ScriptMgr::LoadEventIdScripts()
|
|||
eventId, SPELL_EFFECT_SEND_EVENT);
|
||||
|
||||
m_EventIdScripts[eventId] = GetScriptId(scriptName);
|
||||
} while(result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -1837,7 +1840,8 @@ void ScriptMgr::LoadScriptNames()
|
|||
bar.step();
|
||||
m_scriptNames.push_back((*result)[0].GetString());
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
std::sort(m_scriptNames.begin(), m_scriptNames.end());
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ enum ScriptCommand // resSource, resTar
|
|||
#define MAX_TEXT_ID 4 // used for SCRIPT_COMMAND_TALK
|
||||
|
||||
enum ScriptInfoDataFlags
|
||||
{ // default: s/b -> t
|
||||
{
|
||||
// default: s/b -> t
|
||||
SCRIPT_FLAG_BUDDY_AS_TARGET = 0x01, // s -> b
|
||||
SCRIPT_FLAG_REVERSE_DIRECTION = 0x02, // t* -> s* (* result after previous flag is evaluated)
|
||||
SCRIPT_FLAG_SOURCE_TARGETS_SELF = 0x04, // s* -> s* (* result after previous flag is evaluated)
|
||||
|
|
|
|||
|
|
@ -215,7 +215,8 @@ enum ItemQualities
|
|||
|
||||
#define MAX_ITEM_QUALITY 8
|
||||
|
||||
const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
|
||||
const uint32 ItemQualityColors[MAX_ITEM_QUALITY] =
|
||||
{
|
||||
0xff9d9d9d, //GREY
|
||||
0xffffffff, //WHITE
|
||||
0xff1eff00, //GREEN
|
||||
|
|
@ -1065,7 +1066,8 @@ enum SpellCastResultCustom
|
|||
|
||||
// Spell aura states
|
||||
enum AuraState
|
||||
{ // (C) used in caster aura state (T) used in target aura state
|
||||
{
|
||||
// (C) used in caster aura state (T) used in target aura state
|
||||
// (c) used in caster aura state-not (t) used in target aura state-not
|
||||
AURA_STATE_DEFENSE = 1, // C |
|
||||
AURA_STATE_HEALTHLESS_20_PERCENT = 2, // CcT |
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@ void LoadSkillDiscoveryTable()
|
|||
}
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ void LoadSkillExtraItemTable()
|
|||
skillExtraItemEntry.additionalMaxNum = additionalMaxNum;
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
|
|||
|
|
@ -1102,7 +1102,8 @@ void SpellMgr::LoadSpellTargetPositions()
|
|||
mSpellTargetPositions[Spell_ID] = st;
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -1337,7 +1338,8 @@ void SpellMgr::LoadSpellProcEvents()
|
|||
|
||||
rankHelper.RecordRank(spe, entry);
|
||||
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
rankHelper.FillHigherRanks();
|
||||
|
||||
|
|
@ -1411,7 +1413,8 @@ void SpellMgr::LoadSpellProcItemEnchant()
|
|||
doForHighRanks(entry,worker);
|
||||
|
||||
++count;
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -1612,7 +1615,8 @@ void SpellMgr::LoadSpellBonuses()
|
|||
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -1722,7 +1726,8 @@ void SpellMgr::LoadSpellElixirs()
|
|||
mSpellElixirs[entry] = mask;
|
||||
|
||||
++count;
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -1817,7 +1822,8 @@ void SpellMgr::LoadSpellThreats()
|
|||
|
||||
rankHelper.RecordRank(ste, entry);
|
||||
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
rankHelper.FillHigherRanks();
|
||||
|
||||
|
|
@ -2497,7 +2503,8 @@ bool SpellMgr::IsPrimaryProfessionSpell(uint32 spellId)
|
|||
uint32 SpellMgr::GetProfessionSpellMinLevel(uint32 spellId)
|
||||
{
|
||||
uint32 s2l[8][3] =
|
||||
{ // 0 - gather 1 - non-gather 2 - fish
|
||||
{
|
||||
// 0 - gather 1 - non-gather 2 - fish
|
||||
/*0*/ { 0, 5, 5 },
|
||||
/*1*/ { 0, 5, 5 },
|
||||
/*2*/ { 0, 10, 10 },
|
||||
|
|
@ -2952,7 +2959,8 @@ void SpellMgr::LoadSpellChains()
|
|||
mSpellChains[spell_id] = node;
|
||||
|
||||
++new_count;
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -3127,7 +3135,8 @@ void SpellMgr::LoadSpellLearnSpells()
|
|||
mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spell_id,node));
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -3294,7 +3303,8 @@ void SpellMgr::LoadSpellScriptTarget()
|
|||
mSpellScriptTarget.insert(SpellScriptTarget::value_type(spellId,SpellTargetEntry(SpellTargetType(type),targetEntry)));
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -3400,7 +3410,8 @@ void SpellMgr::LoadSpellPetAuras()
|
|||
}
|
||||
|
||||
++count;
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -3875,7 +3886,8 @@ void SpellMgr::LoadSpellAreas()
|
|||
mSpellAreaForAuraMap.insert(SpellAreaForAuraMap::value_type(abs(spellArea.auraSpell),sa));
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
@ -4319,7 +4331,8 @@ void SpellMgr::CheckUsedSpells(char const* table)
|
|||
}
|
||||
}
|
||||
|
||||
} while( result->NextRow() );
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue