Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 05-09-2004, 09:47 AM
Jezebell
Discordant
 
Join Date: Feb 2004
Location: Florida
Posts: 441
Default

What file(s) are these in?

Code:
IMPORTANT 

The following line in ItemCommonInst::IsEquipable must be altered: 
Code: 

if( level_ < level ) 
 

Change to: 
Code: 

if( level_ <= level ) 
 


WITHOUT THIS CHANGE, PLAYERS OF THE REQUIRED LEVEL TO EQUIP AN ITEM WILL HAVE THEIR REQ. LVL ITEMS DELETED 

Next, ValidateInventory now looks like this: 
Code: 

bool Database::ValidateInventory( uint32 char_id, PlayerProfile_Struct* pp, Inventory* inv ) 
{ 
   if( !pp || !inv ) // null? 
      return false; 

   bool valid = true; 

    ItemInst *item = 0; 
   for( int i = 0; i < 22; ++i ) // Worn slots 
   { 
      item = inv->GetItem(i); 
      if( item == 0 ) 
         continue; 

      if( item->IsType( ItemTypeCommon ) ) 
      { 
         // Make sure no-one has equipped items their Race, Class, or Level cannot use. 
         if( !item->IsEquipable( pp->race, pp->class_, pp->level ) ) // if item shouldn't be equipped 
         { 
            inv->DeleteItem( i ); // Delete from inventory 
            item = 0; // Null the item 
            SaveInventory( char_id, item, i ); // Save change 
            valid = false; // Inventory was invalid, flag it 
         } 
         // Make sure no-one has equipped 2 handed weapons & a secondary item 
         else if( i == SLOT_PRIMARY && item->IsWeapon() ) 
         { 
            if( (item->GetItem()->Common.Skill == 1) || (item->GetItem()->Common.Skill == 4) || (item->GetItem()->Common.Skill == 35) ) // 2 handed weapons 
            { 
               if( inv->GetItem(SLOT_SECONDARY) ) // and if secondary slot is not empty 
               { 
                  inv->DeleteItem( i ); // Delete from inventory 
                  item = 0; // Null the item 
                  SaveInventory( char_id, item, i ); // Save change 
                  valid = false; // Inventory was invalid, flag it 
               } 
            } 
         } 
      } 
   } 

   return valid; 
}
__________________
Eru, the Creator of Arda
ServerOwner for The First Age
An EQEMulator Roleplaying [Custom-Legit] Server
The First Age Website

Running on: Asus A7N8X-Deluxe, AMD Athlon XP 2100+, Geil 1024MB PC3200 Ultra DDR RAM,
WD 40GB 7200rpm ATA-100 HDD, Visiontek 128MB Geforce4 TI 4400, Windows XP Pro SP2
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:06 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3