# HG changeset patch # User zipi # Date 1375034832 -3600 # Node ID e11c498c0dc64afb02b9f05c98efa22005c0dfaa # Parent 9a1adf08f4ed9c6e46872ebcf996e930a2a34b98 more label cleaning 3 diff -r 9a1adf08f4ed -r e11c498c0dc6 CastSpellInfo.cpp --- a/CastSpellInfo.cpp Sun Jul 28 18:54:40 2013 +0100 +++ b/CastSpellInfo.cpp Sun Jul 28 19:07:12 2013 +0100 @@ -4070,29 +4070,25 @@ unsigned int CastSpellInfo::PushCastSpellInfo(__int16 a2, __int16 uPlayerID, __int16 skill_level, __int16 a5, int spell_sound_id) { unsigned int result; // eax@1 - CastSpellInfo *v7; // edx@1 CastSpellInfo *v8; // ecx@5 result = 0; - v7 = this; - while ( v7->spellnum ) + for( result = 0; result < 10; result++ ) { - ++result; - ++v7; - if ( (signed int)result >= 10 ) - goto LABEL_8; + if(!this[result].spellnum) + { + v8 = &this[result]; + v8->spellnum = a2; + v8->uPlayerID = uPlayerID; + if ( a5 & 0x10 ) + v8->uPlayerID_2 = uPlayerID; + v8->field_6 = 0; + v8->spell_target_pid = 0; + v8->field_8 = a5; + v8->forced_spell_skill_level = skill_level; + v8->sound_id = spell_sound_id; + } } - v8 = &this[result]; - v8->spellnum = a2; - v8->uPlayerID = uPlayerID; - if ( a5 & 0x10 ) - v8->uPlayerID_2 = uPlayerID; - v8->field_6 = 0; - v8->spell_target_pid = 0; - v8->field_8 = a5; - v8->forced_spell_skill_level = skill_level; - v8->sound_id = spell_sound_id; -LABEL_8: if ( result == 10 ) result = -1; return result; diff -r 9a1adf08f4ed -r e11c498c0dc6 Chest.cpp --- a/Chest.cpp Sun Jul 28 18:54:40 2013 +0100 +++ b/Chest.cpp Sun Jul 28 19:07:12 2013 +0100 @@ -419,18 +419,13 @@ item_in_chest_count = CountChestItems(uChestID); if ( item_in_chest_count == -1 ) return 0; - v22 = 0; - if ( v5 > 0 ) - { - while ( !Chest::CanPlaceItemAt(v22, v4->uItemID, pChestWindow->par1C) ) + for( int i = 0; i < v5; i++) + { + if ( Chest::CanPlaceItemAt(i, v4->uItemID, pChestWindow->par1C) ) { - ++v22; - if ( v22 >= v5 ) - goto LABEL_8; + v21 = i; } - v21 = v22; } -LABEL_8: if ( v22 == v5 ) { if ( uActiveCharacter )