comparison Spells.cpp @ 1340:22cb507446a4

turnengine refactoring continue
author Gloval
date Sat, 06 Jul 2013 00:29:29 +0400
parents 13b7be8b06a0
children b3ac17fd12de
comparison
equal deleted inserted replaced
1339:8bfdc44cebfd 1340:22cb507446a4
254 uOverlayID = 0; 254 uOverlayID = 0;
255 } 255 }
256 } 256 }
257 257
258 //----- (004585CA) -------------------------------------------------------- 258 //----- (004585CA) --------------------------------------------------------
259 signed int SpellBuff::_4585CA(__int64 a2) 259 bool SpellBuff::IsBuffExpiredToTime( __int64 time_end )
260 { 260 {
261 if (uExpireTime && uExpireTime < a2) 261 if (uExpireTime && (uExpireTime < time_end))
262 { 262 {
263 uExpireTime = 0; 263 uExpireTime = 0;
264 uPower = 0; 264 uPower = 0;
265 uSkill = 0; 265 uSkill = 0;
266 uOverlayID = 0; 266 uOverlayID = 0;
268 } 268 }
269 return false; 269 return false;
270 } 270 }
271 271
272 //----- (004584E0) -------------------------------------------------------- 272 //----- (004584E0) --------------------------------------------------------
273 bool SpellBuff::Apply(unsigned __int64 uExpireTime, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int uOverlayID, unsigned __int8 caster) 273 bool SpellBuff::Apply( signed __int64 uExpireTime, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int uOverlayID, unsigned __int8 caster )
274 { 274 {
275 if (this->uExpireTime && uExpireTime < this->uExpireTime) 275 if (this->uExpireTime && (uExpireTime < this->uExpireTime))
276 return false; 276 return false;
277 277
278 this->uSkill = uSkillLevel; 278 this->uSkill = uSkillLevel;
279 this->uPower = uPower; 279 this->uPower = uPower;
280 this->uExpireTime = uExpireTime; 280 this->uExpireTime = uExpireTime;