C++
src/Ebenezer/MagicProcess.cpp
if (instance.nSkillID < 500000) {
if (instance.pSkill->bType[0] == TO_USER(pCaster)->m_LastSkillType) {
- if ((TimeGet() - TO_USER(pCaster)->m_LastSkillUseTime) <= 0.7f) {
+ if ((UNIXTIME - TO_USER(pCaster)->m_LastSkillUseTime) <= PLAYER_SKILL_REQUEST_INTERVAL) {
instance.bSendSkillFailed = true;
}
}
src/Ebenezer/User.cpp
m_bWeaponsDisabled = false;
m_teamColour = TeamColourNone;
- m_LastSkillUseTime = 0.0f;
+ m_LastSkillUseTime = UNIXTIME;
m_LastSkillType = 0;
}
src/Ebenezer/User.h
// Time (in seconds) between each save request (5min).
#define PLAYER_SAVE_INTERVAL (5 * 60)
+// Time (in seconds) between each skill request (1sec).
+#define PLAYER_SKILL_REQUEST_INTERVAL 1
enum GameState
{
@@ -271,7 +273,7 @@ class CUser : public Unit, public KOSocket
bool m_bWeaponsDisabled;
TeamColour m_teamColour;
- float m_LastSkillUseTime;
+ time_t m_LastSkillUseTime;
int m_LastSkillType;
public:
Ben Bunu Paylaşayim diye kimse paylaşmiyor
(ALİ EMRE SARI)
src/Ebenezer/MagicProcess.cpp
if (instance.nSkillID < 500000) {
if (instance.pSkill->bType[0] == TO_USER(pCaster)->m_LastSkillType) {
- if ((TimeGet() - TO_USER(pCaster)->m_LastSkillUseTime) <= 0.7f) {
+ if ((UNIXTIME - TO_USER(pCaster)->m_LastSkillUseTime) <= PLAYER_SKILL_REQUEST_INTERVAL) {
instance.bSendSkillFailed = true;
}
}
src/Ebenezer/User.cpp
m_bWeaponsDisabled = false;
m_teamColour = TeamColourNone;
- m_LastSkillUseTime = 0.0f;
+ m_LastSkillUseTime = UNIXTIME;
m_LastSkillType = 0;
}
src/Ebenezer/User.h
// Time (in seconds) between each save request (5min).
#define PLAYER_SAVE_INTERVAL (5 * 60)
+// Time (in seconds) between each skill request (1sec).
+#define PLAYER_SKILL_REQUEST_INTERVAL 1
enum GameState
{
@@ -271,7 +273,7 @@ class CUser : public Unit, public KOSocket
bool m_bWeaponsDisabled;
TeamColour m_teamColour;
- float m_LastSkillUseTime;
+ time_t m_LastSkillUseTime;
int m_LastSkillType;
public:
Ben Bunu Paylaşayim diye kimse paylaşmiyor
(ALİ EMRE SARI)