Show
Ignore:
Timestamp:
11/22/08 00:36:22 (17 years ago)
Author:
yumileroy
Message:

Merged commit 269 (5f0e38da128a).

Original author: gvcoman
Date: 2008-11-21 14:34:05-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/ItemHandler.cpp

    r272 r279  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    314314            if (il) 
    315315            { 
    316                 if (il->Name.size() > loc_idx && !il->Name[loc_idx].empty()) 
     316                if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty()) 
    317317                    Name = il->Name[loc_idx]; 
    318                 if (il->Description.size() > loc_idx && !il->Description[loc_idx].empty()) 
     318                if (il->Description.size() > size_t(loc_idx) && !il->Description[loc_idx].empty()) 
    319319                    Description = il->Description[loc_idx]; 
    320320            } 
     
    361361            data << pProto->Damage[i].DamageType; 
    362362        } 
     363 
     364        // resistances (7) 
    363365        data << pProto->Armor; 
    364366        data << pProto->HolyRes; 
     
    368370        data << pProto->ShadowRes; 
    369371        data << pProto->ArcaneRes; 
     372 
    370373        data << pProto->Delay; 
    371374        data << pProto->Ammo_type; 
    372  
    373         data << (float)pProto->RangedModRange; 
     375        data << pProto->RangedModRange; 
     376 
    374377        for(int s = 0; s < 5; s++) 
    375378        { 
     
    977980            if (il) 
    978981            { 
    979                 if (il->Name.size() > loc_idx && !il->Name[loc_idx].empty()) 
     982                if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty()) 
    980983                    Name = il->Name[loc_idx]; 
    981984            } 
     
    10281031    } 
    10291032 
    1030     if(item==gift)                                          // not possible with pacjket from real client 
     1033    if(item==gift)                                          // not possable with pacjket from real client 
    10311034    { 
    10321035        _player->SendEquipError( EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED, item, NULL ); 
     
    10731076    CharacterDatabase.BeginTransaction(); 
    10741077    CharacterDatabase.PExecute("INSERT INTO character_gifts VALUES ('%u', '%u', '%u', '%u')", GUID_LOPART(item->GetOwnerGUID()), item->GetGUIDLow(), item->GetEntry(), item->GetUInt32Value(ITEM_FIELD_FLAGS)); 
    1075     item->SetUInt32Value(OBJECT_FIELD_ENTRY, gift->GetUInt32Value(OBJECT_FIELD_ENTRY)); 
     1078    item->SetEntry(gift->GetEntry()); 
    10761079 
    10771080    switch (item->GetEntry()) 
    10781081    { 
    1079         case 5042:  item->SetUInt32Value(OBJECT_FIELD_ENTRY, 5043); break; 
    1080         case 5048:  item->SetUInt32Value(OBJECT_FIELD_ENTRY, 5044); break; 
    1081         case 17303: item->SetUInt32Value(OBJECT_FIELD_ENTRY, 17302); break; 
    1082         case 17304: item->SetUInt32Value(OBJECT_FIELD_ENTRY, 17305); break; 
    1083         case 17307: item->SetUInt32Value(OBJECT_FIELD_ENTRY, 17308); break; 
    1084         case 21830: item->SetUInt32Value(OBJECT_FIELD_ENTRY, 21831); break; 
     1082        case 5042:  item->SetEntry( 5043); break; 
     1083        case 5048:  item->SetEntry( 5044); break; 
     1084        case 17303: item->SetEntry(17302); break; 
     1085        case 17304: item->SetEntry(17305); break; 
     1086        case 17307: item->SetEntry(17308); break; 
     1087        case 21830: item->SetEntry(21831); break; 
    10851088    } 
    10861089    item->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, _player->GetGUID());