Changeset 279 for trunk/src/game/ItemHandler.cpp
- Timestamp:
- 11/22/08 00:36:22 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/ItemHandler.cpp
r272 r279 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 314 314 if (il) 315 315 { 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()) 317 317 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()) 319 319 Description = il->Description[loc_idx]; 320 320 } … … 361 361 data << pProto->Damage[i].DamageType; 362 362 } 363 364 // resistances (7) 363 365 data << pProto->Armor; 364 366 data << pProto->HolyRes; … … 368 370 data << pProto->ShadowRes; 369 371 data << pProto->ArcaneRes; 372 370 373 data << pProto->Delay; 371 374 data << pProto->Ammo_type; 372 373 data << (float)pProto->RangedModRange; 375 data << pProto->RangedModRange; 376 374 377 for(int s = 0; s < 5; s++) 375 378 { … … 977 980 if (il) 978 981 { 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()) 980 983 Name = il->Name[loc_idx]; 981 984 } … … 1028 1031 } 1029 1032 1030 if(item==gift) // not poss ible with pacjket from real client1033 if(item==gift) // not possable with pacjket from real client 1031 1034 { 1032 1035 _player->SendEquipError( EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED, item, NULL ); … … 1073 1076 CharacterDatabase.BeginTransaction(); 1074 1077 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->Set UInt32Value(OBJECT_FIELD_ENTRY, gift->GetUInt32Value(OBJECT_FIELD_ENTRY));1078 item->SetEntry(gift->GetEntry()); 1076 1079 1077 1080 switch (item->GetEntry()) 1078 1081 { 1079 case 5042: item->Set UInt32Value(OBJECT_FIELD_ENTRY,5043); break;1080 case 5048: item->Set UInt32Value(OBJECT_FIELD_ENTRY,5044); break;1081 case 17303: item->Set UInt32Value(OBJECT_FIELD_ENTRY,17302); break;1082 case 17304: item->Set UInt32Value(OBJECT_FIELD_ENTRY,17305); break;1083 case 17307: item->Set UInt32Value(OBJECT_FIELD_ENTRY,17308); break;1084 case 21830: item->Set UInt32Value(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; 1085 1088 } 1086 1089 item->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, _player->GetGUID());