Broken CastSpell with item

Moderator: MacroQuest Developers

spanners
a lesser mummy
a lesser mummy
Posts: 56
Joined: Wed Jul 04, 2007 3:02 pm

Broken CastSpell with item

Post by spanners » Sat Oct 03, 2009 1:24 pm

For some time the CastSpell command in ISXEQ has been broken when used with an item. Here is a patch that restores this functionality.

Devs, can this please be rolled into the next release ?

Code: Select all

--- MQ2-20090915-orig/MQ2Main/ISXEQ/ISXEQCommands.cpp	2009-04-11 18:28:12.000000000 -0500
+++ MQ2-20090915/MQ2Main/ISXEQ/ISXEQCommands.cpp	2009-10-03 12:19:29.543407200 -0500
@@ -562,7 +562,11 @@
             } 
       } 
       if (FOUND) { 
-         pCharData1->CastSpell(10,pItem->Clicky.SpellID,(EQ_Item**)item,0,slot,-1,-1,0,0,1); 
+		 if(CInvSlot *pSlot = pInvSlotMgr->FindInvSlot(slot))
+		 {
+			 CXPoint p; p.A=0; p.B=0;
+			 pSlot->HandleRButtonUp(&p);
+		 }
          return 0; 
       } 
    } 

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Sat Oct 03, 2009 7:28 pm

in next zip...