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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-16-2007, 07:27 PM
cbodmer
Fire Beetle
 
Join Date: Oct 2006
Posts: 24
Default Global Lootdrop Boost

I've come up with a new Rule to allow a server administrator to boost droprates across the board without having to modify the underlying database. This can be used for server special events and occasions, etc. The default setting does not change anything so this is save to apply, even if you don't intend to make use of it.

ruletypes.h
Code:
--- EQEmu-0.7.0-1030/common/ruletypes.h	2007-04-03 05:08:39.000000000 +0200
+++ EQEmu-0.7.0-1030-cb/common/ruletypes.h	2007-08-16 09:32:14.000000000 +0200
@@ -52,6 +52,7 @@
 
 RULE_CATEGORY( Zone )
 RULE_INT ( Zone,  NPCGlobalPositionUpdateInterval, 60000 ) //ms between intervals of sending a position update to the entire zone.
+RULE_INT ( Zone, LootProbabilityBoost, 0 ) // adds XX% probability to all drops across the world
 
 RULE_CATEGORY( Spells )
 RULE_INT (Spells, SpellAggroModifier, 100)
zone/loottables.cpp
Code:
--- EQEmu-0.7.0-1030/zone/loottables.cpp	2007-07-21 06:42:55.000000000 +0200
+++ EQEmu-0.7.0-1030-cb/zone/loottables.cpp	2007-08-17 09:22:26.000000000 +0200
@@ -24,6 +24,7 @@
 #include "masterentity.h"
 #include "zonedb.h"
 #include "../common/MiscFunctions.h"
+#include "../common/rulesys.h"
 #ifdef WIN32
 #define snprintf	_snprintf
 #endif
@@ -161,7 +162,11 @@
 					}
 					tmpLT->Entries[i].lootdrop_id = atoi(row[1]);
 					tmpLT->Entries[i].multiplier = atoi(row[2]);
-					tmpLT->Entries[i].probability = atoi(row[3]);
+					tmpLT->Entries[i].probability = atoi(row[3]) + RuleI( zone, LootProbabilityBoost );
+					if( tmpLT->Entries[i].probability > 100 )
+						tmpLT->Entries[i].probability = 100;
+					if( tmpLT->Entries[i].probability < 0 )
+						tmpLT->Entries[i].probability = 0;
 					i++;
 				}
 				if (!EMuShareMemDLL.Loot.cbAddLootTable(tmpid, tmpLT)) {
Patches are vs -1030. Common sense required for rule setting, I recommend a maximum of 30.

Cheers
Chris
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 11:04 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