Changeset 272 for trunk/src/game/SpellHandler.cpp
- Timestamp:
- 11/22/08 00:35:41 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/SpellHandler.cpp
r267 r272 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. 13 * 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 63 57 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()); 64 58 … … 244 238 245 239 pItem->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, 0); 246 pItem->Set Entry(entry);240 pItem->SetUInt32Value(OBJECT_FIELD_ENTRY, entry); 247 241 pItem->SetUInt32Value(ITEM_FIELD_FLAGS, flags); 248 242 pItem->SetState(ITEM_CHANGED, pUser); … … 266 260 267 261 uint64 guid; 262 uint32 spellId = OPEN_CHEST; 268 263 269 264 recv_data >> guid; … … 328 323 329 324 Spell *spell = new Spell(_player, spellInfo, false); 330 spell->m_cast_count = cast_count; // 325 spell->m_cast_count = cast_count; //set count of casts 331 326 spell->prepare(&targets); 332 327 } … … 369 364 spellInfo->EffectApplyAuraName[i] == SPELL_AURA_BIND_SIGHT) 370 365 { 371 // Fix me: creature may be killed during player aura cancel372 366 _player->RemoveAurasDueToSpellByCancel(spellId); 373 367 if (_player->GetCharm()) 374 368 _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId); 375 else if (_player->GetFarsightTarget() && _player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT)369 else if (_player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT) 376 370 ((Unit*)_player->GetFarsightTarget())->RemoveAurasDueToSpellByCancel(spellId); 377 371 return;