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 07-05-2007, 07:01 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default Some codes from Cbodmer

Here's some codes made by Leara (Cbodmer in eqemu forums) and has been in use on the Legacy of the Rathe server, I got permission to post them here, but credit goes to Cbmoder;
The XP loss is defined here in zone/attack.cpp:
Code:
...
    // figure out if they should lose exp
    // cb: this formula is based on what? how about xp loss=% of total XP?
    //exploss = (int)(GetLevel() * (GetLevel() / 18.0) * 12000);
    exploss=(int)( (float)GetEXP() * 0.055f ); // loose 5.5% of total XP
...
The original formula is commented out and Cbmoders is added. The original formula calculates a value of experience lost based on level and an assumed "experience progression". It's rather silly because the EQ experience progression is not linear so that formula just fails. Cbmoders formula simply takes a fixed % of XP from the total experience the player has acquired. 5.5% is what I set it at, but of course you could tweak that. Also, it could be changed to use a new rule to define the XP % loss.

aggro.cpp patch (This fixes harmony/lull type spells IIRC):
Code:
--- EQEmu-0.7.0-911/zone/aggro.cpp    2006-10-31 04:04:24.000000000 +0100
+++ EQEmu-0.7.0-cb911/zone/aggro.cpp    2006-11-17 09:47:26.000000000 +0100
@@ -494,9 +494,10 @@
                 becomenpc = mob2->CastToClient();
     
                 //who made up this rule???
-                /*if(c1->GetLevel() > becomenpc->GetBecomeNPCLevel())
+                // cb: this rule is correct - /becomenpc has an attack level limit
+                if(c1->GetLevel() > becomenpc->GetBecomeNPCLevel())
                     return false;
-                else*/
+                else
                     return true;
             }    
             else if(_CLIENTCORPSE(mob2))    // client vs client corpse
@@ -642,6 +643,7 @@
             }
             else if(_NPC(mob2))                // client to npc
             {
+                return true;
             }
             else if(_BECOMENPC(mob2))    // client to becomenpc
             {
spell_effects.cpp patch (This fix tells the owner of a pet when any of its buffs wear off, just like it does on EQ live):
Code:
--- EQEmu-0.7.0-911/zone/spell_effects.cpp    2006-11-04 19:10:22.000000000 +0100
+++ EQEmu-0.7.0-cb911/zone/spell_effects.cpp    2006-11-17 10:45:20.000000000 +0100
@@ -2458,10 +2458,18 @@
 
     // notify caster of buff that it's worn off
     Mob *p = entity_list.GetMob(buffs[slot].casterid);
-    if (p && p->IsClient() && p != this && !IsBardSong(buffs[slot].spellid))
+    if (p && (p->IsClient() || p->IsPet()) && p != this && !IsBardSong(buffs[slot].spellid))
     {
-        p->Message_StringID(MT_Broadcasts, SPELL_WORN_OFF_OF,
-            spells[buffs[slot].spellid].name, GetCleanName());
+        if(p->IsPet())
+        {
+            p->GetOwner()->Message_StringID(MT_Broadcasts, SPELL_WORN_OFF_OF,
+                spells[buffs[slot].spellid].name, GetCleanName());
+        }
+        else
+        {
+            p->Message_StringID(MT_Broadcasts, SPELL_WORN_OFF_OF,
+                spells[buffs[slot].spellid].name, GetCleanName());
+        }
     }
 
     buffs[slot].spellid = SPELL_UNKNOWN;
Both latter patches are vs the 911 tree, but they should be easy enough to apply to the latest tree unless those parts have been fixed/changed meanwhile. The XP loss has already been applied to 1002 and works good.
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 04:44 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