Mercurial > mm7
comparison Actor.cpp @ 1970:8e36ef7de0db
Actor::_427102 cleaned up
author | Grumpy7 |
---|---|
date | Sat, 26 Oct 2013 00:06:07 -0700 |
parents | a9adc0aa49ca |
children | e45c277da9f1 |
comparison
equal
deleted
inserted
replaced
1969:a9adc0aa49ca | 1970:8e36ef7de0db |
---|---|
4121 | 4121 |
4122 //----- (00426A5A) -------------------------------------------------------- | 4122 //----- (00426A5A) -------------------------------------------------------- |
4123 void Actor::LootActor() | 4123 void Actor::LootActor() |
4124 { | 4124 { |
4125 signed int v2; // edi@1 | 4125 signed int v2; // edi@1 |
4126 char v3; // zf@1 | |
4127 unsigned int v4; // eax@13 | |
4128 unsigned int v5; // esi@13 | |
4129 int v6; // eax@14 | |
4130 unsigned __int8 v7; // al@30 | 4126 unsigned __int8 v7; // al@30 |
4131 char *v9; // [sp-4h] [bp-3Ch]@10 | 4127 char *v9; // [sp-4h] [bp-3Ch]@10 |
4132 char *v10; // [sp-4h] [bp-3Ch]@31 | 4128 char *v10; // [sp-4h] [bp-3Ch]@31 |
4133 char *v11; // [sp-4h] [bp-3Ch]@38 | 4129 char *v11; // [sp-4h] [bp-3Ch]@38 |
4134 ItemGen Dst; // [sp+Ch] [bp-2Ch]@1 | 4130 ItemGen Dst; // [sp+Ch] [bp-2Ch]@1 |
4266 } | 4262 } |
4267 } | 4263 } |
4268 | 4264 |
4269 | 4265 |
4270 //----- (00427102) -------------------------------------------------------- | 4266 //----- (00427102) -------------------------------------------------------- |
4271 int Actor::_427102(signed int a2) | 4267 bool Actor::_427102( signed int a2 ) |
4272 { | 4268 { |
4273 unsigned __int8 v3; // cf@11 | |
4274 unsigned __int8 v4; // zf@11 | |
4275 SpellBuff *v6; // ecx@46 | |
4276 Player *v7; // esi@49 | |
4277 signed int v8; // edx@50 | |
4278 SpellBuff *v9; // ecx@50 | |
4279 | |
4280 switch(a2) | 4269 switch(a2) |
4281 { | 4270 { |
4282 case SPELL_BODY_POWER_CURE: | 4271 case SPELL_BODY_POWER_CURE: |
4283 { | 4272 { |
4284 if ( this->sCurrentHP >= (signed int)this->pMonsterInfo.uHP ) | 4273 if ( this->sCurrentHP >= (signed int)this->pMonsterInfo.uHP ) |
4285 return 0; | 4274 return false; |
4286 return 1; | 4275 return true; |
4287 } | 4276 } |
4288 case SPELL_LIGHT_DISPEL_MAGIC: | 4277 case SPELL_LIGHT_DISPEL_MAGIC: |
4289 { | 4278 { |
4290 v6 = pParty->pPartyBuffs.data(); | 4279 for (int i = 0; i < 20; i++) |
4291 while ( (signed __int64)v6->uExpireTime <= 0 ) | 4280 { |
4292 { | 4281 if (pParty->pPartyBuffs[i].uExpireTime > 0) |
4293 ++v6; | |
4294 if ( v6 > &pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE] ) | |
4295 { | 4282 { |
4296 v7 = pParty->pPlayers.data();//[0].pPlayerBuffs; | 4283 return true; |
4297 LABEL_50: | 4284 } |
4298 v8 = 0; | 4285 } |
4299 v9 = v7->pPlayerBuffs.data(); | 4286 for ( int i = 1; i <= 4; i++ ) |
4300 while ( v9->uExpireTime <= 0i64 ) | 4287 { |
4288 for ( int j = 0; j < 22; j++ ) | |
4289 { | |
4290 if (pPlayers[i]->pPlayerBuffs[j].uExpireTime > 0) | |
4301 { | 4291 { |
4302 ++v8; | 4292 return true; |
4303 ++v9; | |
4304 if ( v8 >= 24 ) | |
4305 { | |
4306 ++v7; | |
4307 if ( v7 <= &pParty->pPlayers[3] ) | |
4308 goto LABEL_50; | |
4309 return 0; | |
4310 } | |
4311 } | 4293 } |
4312 return 1; | |
4313 } | 4294 } |
4314 } | 4295 } |
4315 return 1; | 4296 return false; |
4316 } | 4297 } |
4317 case SPELL_LIGHT_DAY_OF_PROTECTION: | 4298 case SPELL_LIGHT_DAY_OF_PROTECTION: |
4318 { | 4299 { |
4319 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) < 0 ) | 4300 return this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime <= 0; |
4320 return 1; | |
4321 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) > 0 ) | |
4322 return 0; | |
4323 v3 = 0; | |
4324 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_DAY_OF_PROTECTION].uExpireTime) == 0; | |
4325 break; | 4301 break; |
4326 } | 4302 } |
4327 case SPELL_LIGHT_HOUR_OF_POWER: | 4303 case SPELL_LIGHT_HOUR_OF_POWER: |
4328 { | 4304 { |
4329 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) < 0 ) | 4305 return this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime <= 0; |
4330 return 1; | |
4331 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) > 0 ) | |
4332 return 0; | |
4333 v3 = 0; | |
4334 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].uExpireTime) == 0; | |
4335 break; | 4306 break; |
4336 } | 4307 } |
4337 case SPELL_DARK_PAIN_REFLECTION: | 4308 case SPELL_DARK_PAIN_REFLECTION: |
4338 { | 4309 { |
4339 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) < 0 ) | 4310 return this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime <= 0; |
4340 return 1; | |
4341 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) > 0 ) | |
4342 return 0; | |
4343 v3 = 0; | |
4344 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime) == 0; | |
4345 break; | 4311 break; |
4346 } | 4312 } |
4347 case SPELL_BODY_HAMMERHANDS: | 4313 case SPELL_BODY_HAMMERHANDS: |
4348 { | 4314 { |
4349 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) < 0 ) | 4315 return this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime <= 0; |
4350 return 1; | |
4351 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) > 0 ) | |
4352 return 0; | |
4353 v3 = 0; | |
4354 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].uExpireTime) == 0; | |
4355 break; | 4316 break; |
4356 } | 4317 } |
4357 case SPELL_FIRE_HASTE: | 4318 case SPELL_FIRE_HASTE: |
4358 { | 4319 { |
4359 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) < 0 ) | 4320 return this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime <= 0; |
4360 return 1; | |
4361 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) > 0 ) | |
4362 return 0; | |
4363 v3 = 0; | |
4364 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_HASTE].uExpireTime) == 0; | |
4365 break; | 4321 break; |
4366 } | 4322 } |
4367 case SPELL_AIR_SHIELD: | 4323 case SPELL_AIR_SHIELD: |
4368 { | 4324 { |
4369 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) < 0 ) | 4325 return this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime <= 0; |
4370 return 1; | |
4371 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) > 0 ) | |
4372 return 0; | |
4373 v3 = 0; | |
4374 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) == 0; | |
4375 break; | 4326 break; |
4376 } | 4327 } |
4377 case SPELL_EARTH_STONESKIN: | 4328 case SPELL_EARTH_STONESKIN: |
4378 { | 4329 { |
4379 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) < 0 ) | 4330 return this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime <= 0; |
4380 return 1; | 4331 break; |
4381 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) > 0 ) | |
4382 return 0; | |
4383 v3 = 0; | |
4384 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_STONESKIN].uExpireTime) == 0; | |
4385 } | 4332 } |
4386 case SPELL_SPIRIT_BLESS: | 4333 case SPELL_SPIRIT_BLESS: |
4387 { | 4334 { |
4388 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) < 0 ) | 4335 return this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime <= 0; |
4389 return 1; | |
4390 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) > 0 ) | |
4391 return 0; | |
4392 v3 = 0; | |
4393 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_BLESS].uExpireTime) == 0; | |
4394 break; | 4336 break; |
4395 } | 4337 } |
4396 case SPELL_SPIRIT_FATE: | 4338 case SPELL_SPIRIT_FATE: |
4397 { | 4339 { |
4398 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) < 0 ) | 4340 return this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime <= 0; |
4399 return 1; | |
4400 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) > 0 ) | |
4401 return 0; | |
4402 v3 = 0; | |
4403 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_FATE].uExpireTime) == 0; | |
4404 break; | 4341 break; |
4405 } | 4342 } |
4406 case SPELL_SPIRIT_HEROISM: | 4343 case SPELL_SPIRIT_HEROISM: |
4407 { | 4344 { |
4408 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime) < 0 ) | 4345 return this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime <= 0; |
4409 return 1; | |
4410 if ( SHIDWORD(this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime) <= 0 ) | |
4411 { | |
4412 v3 = 0; | |
4413 v4 = LODWORD(this->pActorBuffs[ACTOR_BUFF_HEROISM].uExpireTime) == 0; | |
4414 } | |
4415 else | |
4416 return 0; | |
4417 break; | 4346 break; |
4418 } | 4347 } |
4419 default: | 4348 default: |
4420 { | 4349 { |
4421 return 1; | 4350 return true; |
4422 } | 4351 } |
4423 } | 4352 } |
4424 if ( !(v3 | v4) ) | 4353 } |
4425 return 0; | |
4426 return 1; | |
4427 } |