comparison CastSpellInfo.cpp @ 2224:c2eeeb991a87

some more pvs warning fixes
author Grumpy7
date Wed, 19 Feb 2014 22:26:10 +0100
parents 42c8807225a2
children 080fd5a5433d
comparison
equal deleted inserted replaced
2202:44d956d4f838 2224:c2eeeb991a87
490 pSpellSprite.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); 490 pSpellSprite.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
491 pSpellSprite.uFacing = LOWORD(v715.uYawAngle); 491 pSpellSprite.uFacing = LOWORD(v715.uYawAngle);
492 pSpellSprite.uAttributes |= 0x80u; 492 pSpellSprite.uAttributes |= 0x80u;
493 pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); 493 pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id);
494 int obj_id = pSpellSprite.Create(0, 0, 0, 0); 494 int obj_id = pSpellSprite.Create(0, 0, 0, 0);
495 if ( !MonsterStats::BelongsToSupertype(pActor->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) 495 if ( !MonsterStats::BelongsToSupertype(pActors[PID_ID(a2)].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) )
496 { 496 {
497 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed 497 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed
498 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); 498 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0);
499 pCastSpell->uSpellID = 0; 499 pCastSpell->uSpellID = 0;
500 continue; 500 continue;
2068 if ( !pPlayer->CanCastSpell(uRequiredMana) ) 2068 if ( !pPlayer->CanCastSpell(uRequiredMana) )
2069 break; 2069 break;
2070 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Eradicated] 2070 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Eradicated]
2071 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Dead] ) 2071 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Dead] )
2072 { 2072 {
2073 if ( !(pParty->pPlayers[v396].pConditions[Condition_Weak]) ) 2073 if ( !(pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak]) )
2074 pParty->pPlayers[v396].PlaySound(SPEECH_25, 0); 2074 pParty->pPlayers[pCastSpell->uPlayerID_2].PlaySound(SPEECH_25, 0);
2075 if ( skill_level == 4 ) 2075 if ( skill_level == 4 )
2076 { 2076 {
2077 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Eradicated] = 0; 2077 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Eradicated] = 0;
2078 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Dead] = 0; 2078 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Dead] = 0;
2079 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Unconcious] = 0; 2079 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Unconcious] = 0;