Changeset 260 for trunk/src/game/SpellHandler.cpp
- Timestamp:
- 11/21/08 08:47:55 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/SpellHandler.cpp
r252 r260 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 … … 55 55 } 56 56 57 if(pItem->GetGUID() != item_guid) 58 { 59 pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL ); 60 return; 61 } 62 57 63 sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, spell_count: %u , cast_count: %u, Item: %u, data length = %i", bagIndex, slot, spell_count, cast_count, pItem->GetEntry(), recvPacket.size()); 58 64 … … 238 244 239 245 pItem->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, 0); 240 pItem->Set UInt32Value(OBJECT_FIELD_ENTRY,entry);246 pItem->SetEntry(entry); 241 247 pItem->SetUInt32Value(ITEM_FIELD_FLAGS, flags); 242 248 pItem->SetState(ITEM_CHANGED, pUser); … … 260 266 261 267 uint64 guid; 262 uint32 spellId = OPEN_CHEST;263 268 264 269 recv_data >> guid; … … 323 328 324 329 Spell *spell = new Spell(_player, spellInfo, false); 325 spell->m_cast_count = cast_count; // set count of casts330 spell->m_cast_count = cast_count; // set count of casts 326 331 spell->prepare(&targets); 327 332 }