Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2010, 01:38 PM
Leere
Sarnak
 
Join Date: Sep 2008
Location: Home
Posts: 31
Default COMMITTED: quest::LearnRecipe

Makes LearnRecipe accessible for the initiating $client via quest::LearnRecipe.

Code:
Index: zone/perlparser.cpp
===================================================================
--- zone/perlparser.cpp    (revision 1754)
+++ zone/perlparser.cpp    (working copy)
@@ -3072,7 +3072,21 @@
     XSRETURN_EMPTY;
 }
 
+XS(XS__LearnRecipe);
+XS(XS__LearnRecipe)
+{
+    dXSARGS;
+    if (items != 1)
+        Perl_croak(aTHX_ "Usage: LearnRecipe(recipe_id)");
 
+    uint32 recipe_id = (uint32)SvIV(ST(0));
+
+    quest_manager.LearnRecipe(recipe_id);
+
+    XSRETURN_EMPTY;
+}
+
+
 /*
 This is the callback perl will look for to setup the
 quest package's XSUBs
@@ -3272,6 +3286,7 @@
         newXS(strcpy(buf, "removetitle"), XS__removetitle, file);
         newXS(strcpy(buf, "wearchange"), XS__wearchange, file);
         newXS(strcpy(buf, "voicetell"), XS__voicetell, file);
+        newXS(strcpy(buf, "LearnRecipe"), XS__LearnRecipe, file);
     XSRETURN_YES;
 }
Code:
Index: zone/questmgr.cpp
===================================================================
--- zone/questmgr.cpp    (revision 1754)
+++ zone/questmgr.cpp    (working copy)
@@ -2428,6 +2428,12 @@
    initiator->RemoveTitle(titleset);
 }
 
+void QuestManager::LearnRecipe(uint32 recipe_id) {
+    if(!initiator)
+        return;
+    initiator->LearnRecipe(recipe_id);
+}
+
 void QuestManager::wearchange(int8 slot, int16 texture)
 {
     if(owner){
Code:
Index: zone/questmgr.h
===================================================================
--- zone/questmgr.h    (revision 1754)
+++ zone/questmgr.h    (working copy)
@@ -190,6 +190,7 @@
     void enabletitle(int titleset);
        bool checktitle(int titlecheck);
        void removetitle(int titlecheck);
+    void LearnRecipe(uint32 recipe_id);
 
     int16 CreateGroundObject(int32 itemid, float x, float y, float z, float heading, int32 decay_time = 300000);
     int16 CreateGroundObjectFromModel(const char* model, float x, float y, float z, float heading, int8 type = 0x00, int32 decay_time = 0);
Reply With Quote
  #2  
Old 01-13-2011, 12:32 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Committed in r1818.
Reply With Quote
Reply


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 07:26 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3