Re-commit 262 due to EOL issues. (no difference from 262)

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-20 16:16:57 -06:00
parent 0b61584e1b
commit 1e997b95cc
359 changed files with 2730 additions and 2144 deletions

View File

@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"
@@ -54,6 +54,12 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
if(pItem->GetGUID() != item_guid)
{
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL );
return;
}
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());
ItemPrototype const *proto = pItem->GetProto();
@@ -237,7 +243,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
uint32 flags = fields[1].GetUInt32();
pItem->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, 0);
pItem->SetUInt32Value(OBJECT_FIELD_ENTRY, entry);
pItem->SetEntry(entry);
pItem->SetUInt32Value(ITEM_FIELD_FLAGS, flags);
pItem->SetState(ITEM_CHANGED, pUser);
delete result;
@@ -259,7 +265,6 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
CHECK_PACKET_SIZE(recv_data,8);
uint64 guid;
uint32 spellId = OPEN_CHEST;
recv_data >> guid;
@@ -322,7 +327,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
}
Spell *spell = new Spell(_player, spellInfo, false);
spell->m_cast_count = cast_count; //set count of casts
spell->m_cast_count = cast_count; // set count of casts
spell->prepare(&targets);
}