Mercurial > mm7
comparison CastSpellInfo.cpp @ 1429:c7489dd19f88
BuildingType_Tavern and CastSpellInfo_PushCastSpellInfo fix
author | Ritor1 |
---|---|
date | Thu, 01 Aug 2013 17:51:16 +0600 |
parents | e11c498c0dc6 |
children | 71a2cf416478 |
comparison
equal
deleted
inserted
replaced
1428:50d1412cd2c0 | 1429:c7489dd19f88 |
---|---|
4067 | 4067 |
4068 } | 4068 } |
4069 //----- (00427DA0) -------------------------------------------------------- | 4069 //----- (00427DA0) -------------------------------------------------------- |
4070 unsigned int CastSpellInfo::PushCastSpellInfo(__int16 a2, __int16 uPlayerID, __int16 skill_level, __int16 a5, int spell_sound_id) | 4070 unsigned int CastSpellInfo::PushCastSpellInfo(__int16 a2, __int16 uPlayerID, __int16 skill_level, __int16 a5, int spell_sound_id) |
4071 { | 4071 { |
4072 unsigned int result; // eax@1 | 4072 for ( uint i = 0; i < 10; i++ ) |
4073 CastSpellInfo *v8; // ecx@5 | |
4074 | |
4075 result = 0; | |
4076 for( result = 0; result < 10; result++ ) | |
4077 { | 4073 { |
4078 if(!this[result].spellnum) | 4074 if ( !this[i].spellnum ) |
4079 { | 4075 { |
4080 v8 = &this[result]; | 4076 this[i].spellnum = a2; |
4081 v8->spellnum = a2; | 4077 this[i].uPlayerID = uPlayerID; |
4082 v8->uPlayerID = uPlayerID; | 4078 if ( a5 & 0x10 ) |
4083 if ( a5 & 0x10 ) | 4079 this[i].uPlayerID_2 = uPlayerID; |
4084 v8->uPlayerID_2 = uPlayerID; | 4080 this[i].field_6 = 0; |
4085 v8->field_6 = 0; | 4081 this[i].spell_target_pid = 0; |
4086 v8->spell_target_pid = 0; | 4082 this[i].field_8 = a5; |
4087 v8->field_8 = a5; | 4083 this[i].forced_spell_skill_level = skill_level; |
4088 v8->forced_spell_skill_level = skill_level; | 4084 this[i].sound_id = spell_sound_id; |
4089 v8->sound_id = spell_sound_id; | 4085 return i; |
4090 } | 4086 } |
4091 } | 4087 } |
4092 if ( result == 10 ) | 4088 return -1; |
4093 result = -1; | |
4094 return result; | |
4095 } | 4089 } |
4096 //----- (00427D48) -------------------------------------------------------- | 4090 //----- (00427D48) -------------------------------------------------------- |
4097 void CastSpellInfo::_427D48(unsigned int uPlayerID) | 4091 void CastSpellInfo::_427D48(unsigned int uPlayerID) |
4098 { | 4092 { |
4099 CastSpellInfo *v2; // esi@1 | 4093 CastSpellInfo *v2; // esi@1 |