Show
Ignore:
Timestamp:
11/21/08 08:47:55 (17 years ago)
Author:
yumileroy
Message:

*DB script table stucture change. Source Mangos. Also fix some bugs. Hopefully this rev will make program usable again.

Original author: megamage
Date: 2008-11-20 10:43:20-06:00

Files:
1 modified

Legend:

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

    r252 r260  
    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 
     
    5555    } 
    5656 
     57    if(pItem->GetGUID() != item_guid) 
     58    { 
     59        pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL ); 
     60        return; 
     61    } 
     62 
    5763    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()); 
    5864 
     
    238244 
    239245            pItem->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, 0); 
    240             pItem->SetUInt32Value(OBJECT_FIELD_ENTRY, entry); 
     246            pItem->SetEntry(entry); 
    241247            pItem->SetUInt32Value(ITEM_FIELD_FLAGS, flags); 
    242248            pItem->SetState(ITEM_CHANGED, pUser); 
     
    260266 
    261267    uint64 guid; 
    262     uint32 spellId = OPEN_CHEST; 
    263268 
    264269    recv_data >> guid; 
     
    323328 
    324329    Spell *spell = new Spell(_player, spellInfo, false); 
    325     spell->m_cast_count = cast_count;                       //set count of casts 
     330    spell->m_cast_count = cast_count;                       // set count of casts 
    326331    spell->prepare(&targets); 
    327332}