mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[9685] Code style cleanups in quest code.
This commit is contained in:
parent
ea5788ff70
commit
e45d165a8e
6 changed files with 111 additions and 111 deletions
|
|
@ -3630,8 +3630,7 @@ void ObjectMgr::LoadQuests()
|
|||
|
||||
for(int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j )
|
||||
{
|
||||
uint32 id = qinfo->ReqItemId[j];
|
||||
if(id)
|
||||
if (uint32 id = qinfo->ReqItemId[j])
|
||||
{
|
||||
if (qinfo->ReqItemCount[j] == 0)
|
||||
{
|
||||
|
|
@ -3659,8 +3658,7 @@ void ObjectMgr::LoadQuests()
|
|||
|
||||
for(int j = 0; j < QUEST_SOURCE_ITEM_IDS_COUNT; ++j )
|
||||
{
|
||||
uint32 id = qinfo->ReqSourceId[j];
|
||||
if(id)
|
||||
if (uint32 id = qinfo->ReqSourceId[j])
|
||||
{
|
||||
if (!sItemStorage.LookupEntry<ItemPrototype>(id))
|
||||
{
|
||||
|
|
@ -3682,8 +3680,7 @@ void ObjectMgr::LoadQuests()
|
|||
|
||||
for(int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
|
||||
{
|
||||
uint32 id = qinfo->ReqSpell[j];
|
||||
if(id)
|
||||
if (uint32 id = qinfo->ReqSpell[j])
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(id);
|
||||
if (!spellInfo)
|
||||
|
|
@ -3766,8 +3763,7 @@ void ObjectMgr::LoadQuests()
|
|||
|
||||
for(int j = 0; j < QUEST_REWARD_CHOICES_COUNT; ++j )
|
||||
{
|
||||
uint32 id = qinfo->RewChoiceItemId[j];
|
||||
if(id)
|
||||
if (uint32 id = qinfo->RewChoiceItemId[j])
|
||||
{
|
||||
if (!sItemStorage.LookupEntry<ItemPrototype>(id))
|
||||
{
|
||||
|
|
@ -3793,8 +3789,7 @@ void ObjectMgr::LoadQuests()
|
|||
|
||||
for(int j = 0; j < QUEST_REWARDS_COUNT; ++j )
|
||||
{
|
||||
uint32 id = qinfo->RewItemId[j];
|
||||
if(id)
|
||||
if (uint32 id = qinfo->RewItemId[j])
|
||||
{
|
||||
if (!sItemStorage.LookupEntry<ItemPrototype>(id))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1138,7 +1138,7 @@ void Player::Update( uint32 p_time )
|
|||
|
||||
if (!m_timedquests.empty())
|
||||
{
|
||||
std::set<uint32>::iterator iter = m_timedquests.begin();
|
||||
QuestSet::iterator iter = m_timedquests.begin();
|
||||
while (iter != m_timedquests.end())
|
||||
{
|
||||
QuestStatusData& q_status = mQuestStatus[*iter];
|
||||
|
|
|
|||
|
|
@ -2312,7 +2312,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
/*********************************************************/
|
||||
|
||||
//We allow only one timed quest active at the same time. Below can then be simple value instead of set.
|
||||
std::set<uint32> m_timedquests;
|
||||
typedef std::set<uint32> QuestSet;
|
||||
QuestSet m_timedquests;
|
||||
|
||||
uint64 m_divider;
|
||||
uint32 m_ingametime;
|
||||
|
|
|
|||
|
|
@ -1329,9 +1329,12 @@ void World::Update(uint32 diff)
|
|||
{
|
||||
///- Update the different timers
|
||||
for(int i = 0; i < WUPDATE_COUNT; ++i)
|
||||
{
|
||||
if (m_timers[i].GetCurrent()>=0)
|
||||
m_timers[i].Update(diff);
|
||||
else m_timers[i].SetCurrent(0);
|
||||
else
|
||||
m_timers[i].SetCurrent(0);
|
||||
}
|
||||
|
||||
///- Update the game time and check for shutdown time
|
||||
_UpdateGameTime();
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ enum TimeConstants
|
|||
MINUTE = 60,
|
||||
HOUR = MINUTE*60,
|
||||
DAY = HOUR*24,
|
||||
WEEK = DAY*7,
|
||||
MONTH = DAY*30,
|
||||
YEAR = MONTH*12,
|
||||
IN_MILLISECONDS = 1000
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9684"
|
||||
#define REVISION_NR "9685"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue