Changeset 260 for trunk/src/game/Bag.cpp

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/Bag.cpp

    r177 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 
     
    4242    for(int i = 0; i < MAX_BAG_SIZE; ++i) 
    4343        if (m_bagslot[i]) 
    44              delete m_bagslot[i]; 
     44            delete m_bagslot[i]; 
    4545} 
    4646 
     
    7272    Object::_Create( guidlow, 0, HIGHGUID_CONTAINER ); 
    7373 
    74     SetUInt32Value(OBJECT_FIELD_ENTRY, itemid); 
     74    SetEntry(itemid); 
    7575    SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f); 
    7676 
     
    8686    SetUInt32Value(CONTAINER_FIELD_NUM_SLOTS, itemProto->ContainerSlots); 
    8787 
    88     // Cleanning 20 slots 
     88    // Cleaning 20 slots 
    8989    for (uint8 i = 0; i < MAX_BAG_SIZE; i++) 
    9090    { 
     
    214214            if(m_bagslot[i]->GetGUID() == guid) 
    215215                return i; 
     216 
    216217    return NULL_SLOT; 
    217218} 
     
    221222    if( slot < GetBagSize() ) 
    222223        return m_bagslot[slot]; 
    223          
     224 
    224225    return NULL; 
    225226}