Mercurial > mm7
comparison Actor.cpp @ 1969:a9adc0aa49ca
Actor::_427102 changing cases to enum values
author | Grumpy7 |
---|---|
date | Fri, 25 Oct 2013 23:52:16 -0700 |
parents | 7d2c5fa98584 |
children | 8e36ef7de0db |
comparison
equal
deleted
inserted
replaced
1968:7d2c5fa98584 | 1969:a9adc0aa49ca |
---|---|
4277 signed int v8; // edx@50 | 4277 signed int v8; // edx@50 |
4278 SpellBuff *v9; // ecx@50 | 4278 SpellBuff *v9; // ecx@50 |
4279 | 4279 |
4280 switch(a2) | 4280 switch(a2) |
4281 { | 4281 { |
4282 case 77: | 4282 case SPELL_BODY_POWER_CURE: |
4283 { | 4283 { |
4284 if ( this->sCurrentHP >= (signed int)this->pMonsterInfo.uHP ) | 4284 if ( this->sCurrentHP >= (signed int)this->pMonsterInfo.uHP ) |
4285 return 0; | 4285 return 0; |
4286 return 1; | 4286 return 1; |
4287 } | 4287 } |
4288 case 80: | 4288 case SPELL_LIGHT_DISPEL_MAGIC: |
4289 { | 4289 { |
4290 v6 = pParty->pPartyBuffs.data(); | 4290 v6 = pParty->pPartyBuffs.data(); |
4291 while ( (signed __int64)v6->uExpireTime <= 0 ) | 4291 while ( (signed __int64)v6->uExpireTime <= 0 ) |
4292 { | 4292 { |
4293 ++v6; | 4293 ++v6; |
4294 if ( v6 > &pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE] ) | 4294 if ( v6 > &pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE] ) |
4295 { | 4295 { |
4296 v7 = pParty->pPlayers.data();//[0].pPlayerBuffs; | 4296 v7 = pParty->pPlayers.data();//[0].pPlayerBuffs; |
4297 LABEL_50: | |
4297 v8 = 0; | 4298 v8 = 0; |
4298 v9 = v7->pPlayerBuffs.data(); | 4299 v9 = v7->pPlayerBuffs.data(); |
4299 while ( v9->uExpireTime <= 0i64 ) | 4300 while ( v9->uExpireTime <= 0i64 ) |
4300 { | 4301 { |
4301 ++v8; | 4302 ++v8; |
4302 ++v9; | 4303 ++v9; |
4303 if ( v8 >= 24 ) | 4304 if ( v8 >= 24 ) |
4304 { | 4305 { |
4305 ++v7; | 4306 ++v7; |
4306 if ( v7 <= &pParty->pPlayers[3] ) | 4307 if ( v7 <= &pParty->pPlayers[3] ) |
4307 { | 4308 goto LABEL_50; |
4308 v8 = 0; | 4309 return 0; |
4309 v9 = v7->pPlayerBuffs.data(); | |
4310 } | |
4311 else | |
4312 return 0; | |
4313 } | 4310 } |
4314 } | 4311 } |
4315 return 1; | 4312 return 1; |
4316 } | 4313 } |
4317 } | 4314 } |
4318 return 1; | 4315 return 1; |
4319 } | 4316 } |
4320 case 85: | 4317 case SPELL_LIGHT_DAY_OF_PROTECTION: |
4321 { | 4318 { |
4322 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) < 0 ) | 4319 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) < 0 ) |
4323 return 1; | 4320 return 1; |
4324 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) > 0 ) | 4321 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) > 0 ) |
4325 return 0; | 4322 return 0; |
4326 v3 = 0; | 4323 v3 = 0; |
4327 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) == 0; | 4324 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) == 0; |
4328 break; | 4325 break; |
4329 } | 4326 } |
4330 case 86: | 4327 case SPELL_LIGHT_HOUR_OF_POWER: |
4331 { | 4328 { |
4332 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) < 0 ) | 4329 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) < 0 ) |
4333 return 1; | 4330 return 1; |
4334 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) > 0 ) | 4331 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) > 0 ) |
4335 return 0; | 4332 return 0; |
4336 v3 = 0; | 4333 v3 = 0; |
4337 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) == 0; | 4334 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) == 0; |
4338 break; | 4335 break; |
4339 } | 4336 } |
4340 case 95: | 4337 case SPELL_DARK_PAIN_REFLECTION: |
4341 { | 4338 { |
4342 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) < 0 ) | 4339 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) < 0 ) |
4343 return 1; | 4340 return 1; |
4344 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) > 0 ) | 4341 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) > 0 ) |
4345 return 0; | 4342 return 0; |
4346 v3 = 0; | 4343 v3 = 0; |
4347 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) == 0; | 4344 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) == 0; |
4348 break; | 4345 break; |
4349 } | 4346 } |
4350 case 73: | 4347 case SPELL_BODY_HAMMERHANDS: |
4351 { | 4348 { |
4352 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) < 0 ) | 4349 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) < 0 ) |
4353 return 1; | 4350 return 1; |
4354 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) > 0 ) | 4351 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) > 0 ) |
4355 return 0; | 4352 return 0; |
4356 v3 = 0; | 4353 v3 = 0; |
4357 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) == 0; | 4354 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) == 0; |
4358 break; | 4355 break; |
4359 } | 4356 } |
4360 case 5: | 4357 case SPELL_FIRE_HASTE: |
4361 { | 4358 { |
4362 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) < 0 ) | 4359 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) < 0 ) |
4363 return 1; | 4360 return 1; |
4364 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) > 0 ) | 4361 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) > 0 ) |
4365 return 0; | 4362 return 0; |
4366 v3 = 0; | 4363 v3 = 0; |
4367 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) == 0; | 4364 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) == 0; |
4368 break; | 4365 break; |
4369 } | 4366 } |
4370 case 17: | 4367 case SPELL_AIR_SHIELD: |
4371 { | 4368 { |
4372 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) < 0 ) | 4369 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) < 0 ) |
4373 return 1; | 4370 return 1; |
4374 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) > 0 ) | 4371 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) > 0 ) |
4375 return 0; | 4372 return 0; |
4376 v3 = 0; | 4373 v3 = 0; |
4377 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) == 0; | 4374 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) == 0; |
4378 break; | 4375 break; |
4379 } | 4376 } |
4380 case 38: | 4377 case SPELL_EARTH_STONESKIN: |
4381 { | 4378 { |
4382 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) < 0 ) | 4379 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) < 0 ) |
4383 return 1; | 4380 return 1; |
4384 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) > 0 ) | 4381 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) > 0 ) |
4385 return 0; | 4382 return 0; |
4386 v3 = 0; | 4383 v3 = 0; |
4387 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) == 0; | 4384 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) == 0; |
4388 } | 4385 } |
4389 case 46: | 4386 case SPELL_SPIRIT_BLESS: |
4390 { | 4387 { |
4391 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) < 0 ) | 4388 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) < 0 ) |
4392 return 1; | 4389 return 1; |
4393 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) > 0 ) | 4390 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) > 0 ) |
4394 return 0; | 4391 return 0; |
4395 v3 = 0; | 4392 v3 = 0; |
4396 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) == 0; | 4393 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) == 0; |
4397 break; | 4394 break; |
4398 } | 4395 } |
4399 case 47: | 4396 case SPELL_SPIRIT_FATE: |
4400 { | 4397 { |
4401 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) < 0 ) | 4398 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) < 0 ) |
4402 return 1; | 4399 return 1; |
4403 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) > 0 ) | 4400 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) > 0 ) |
4404 return 0; | 4401 return 0; |
4405 v3 = 0; | 4402 v3 = 0; |
4406 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) == 0; | 4403 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) == 0; |
4407 break; | 4404 break; |
4408 } | 4405 } |
4409 case 51: | 4406 case SPELL_SPIRIT_HEROISM: |
4410 { | 4407 { |
4411 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime) < 0 ) | 4408 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime) < 0 ) |
4412 return 1; | 4409 return 1; |
4413 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime) <= 0 ) | 4410 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime) <= 0 ) |
4414 { | 4411 { |