|
|
Модератор форума: Dimitro |
Форум TrinityCore [TrinityCore] Help Player.cpp (бонус за время) |
Player.cpp |
Код https://github.com/conan513/trinitycore-patches/blob/17a7e9a74f57b753610b51ed1bfc826624fb9d51/Individual/Included_in_All/2016_02_29-PlayedTime.patch Вот файлы: https://pastebin.com/j40kc9jW player.h Код { GetSession()->m_muteTime = 0; PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME); stmt->setInt64(0, 0); // Set the mute time to 0 stmt->setString(1, ""); stmt->setString(2, ""); stmt->setUInt32(3, GetSession()->GetAccountId()); LoginDatabase.Execute(stmt); } // PlayedTimeReward if (ptr_Interval > 0) { if (ptr_Interval <= p_time) { GetSession()->SendAreaTriggerMessage("Bonus for played time."); ModifyMoney(ptr_Money); ModifyHonorPoints(ptr_Honor); ModifyArenaPoints(ptr_Arena); ptr_Interval = sConfigMgr->GetIntDefault("PlayedTimeReward.Interval", 0); } else ptr_Interval -= p_time; } if (!m_timedquests.empty()) { QuestSet::iterator iter = m_timedquests.begin(); while (iter != m_timedquests.end()) { QuestStatusData& q_status = m_QuestStatus[*iter]; if (q_status.Timer <= p_time) { uint32 quest_id = *iter; ++iter; // current iter will be removed in FailQuest FailQuest(quest_id); } else { q_status.Timer -= p_time; m_QuestStatusSave[*iter] = QUEST_DEFAULT_SAVE_TYPE; ++iter; } } } Прошу хелпа! |
| |||
| |||