Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-27-2012, 09:23 AM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

Quote:
*CreateBaseItem(classCharm, 0));
You're Telling CreateBaseItem to create an item instance with 0 charges.

As an aside, using the starting_items table is good design. You may not need the flexibility, but what about the convenience?
Once you have your build environment it's pretty easy to recompile but using the table in the database is going to be faster to do in any case, fewer keystrokes, and less opportunity for errors that spawn support threads. In terms of time alone you're at a significant net loss.
Reply With Quote
  #2  
Old 11-27-2012, 09:28 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Quote:
Originally Posted by Tabasco View Post
You're Telling CreateBaseItem to create an item instance with 0 charges.

As an aside, using the starting_items table is good design. You may not need the flexibility, but what about the convenience?
Once you have your build environment it's pretty easy to recompile but using the table in the database is going to be faster to do in any case, fewer keystrokes, and less opportunity for errors that spawn support threads. In terms of time alone you're at a significant net loss.
Code:
ItemInst* SharedDatabase::CreateBaseItem(const Item_Struct* item, sint16 charges) {
	ItemInst* inst = NULL;
	if (item) {
		if (charges == 0)
			charges = item->MaxCharges;

		if(item->CharmFileID != 0 || (item->LoreGroup >= 1000 && item->LoreGroup != -1)) {
			inst = new EvoItemInst(item, charges);
			((EvoItemInst*)inst)->Initialize(this);
		}
		else 
			inst = new ItemInst(item, charges);		
	}
	return inst;
}
Where parameter charges is 0, it presumably uses the value maxcharges from the DB.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:14 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