Page 1 of 2

character methods

Posted: Thu Mar 23, 2006 7:17 pm
by echoism
This will add methods for sit, stand, and dismount to character.
ie.
Me:Stand
Me:Sit
Me:Dismount

in ISXEQDataTypes.cpp

Code: Select all

@@ -179,9 +179,28 @@
                return pSpawnType->GetMethod(Temp,Method,argc,argv);
        }
        // TODO
[color=red]-//     switch((CharacterMethods)pMethod->ID)
-//     {
-//     }
+       char TempCMD[20];
+       switch((CharacterMethods)pMethod->ID)
+       {
+       case Stand:
+               {
+                       sprintf(TempCMD,"/stand");
+                       EzCommand(TempCMD);
+                       return true;
+               }
+       case Sit:
+               {
+                       sprintf(TempCMD,"/sit");
+                       EzCommand(TempCMD);
+                       return true;
+               }
+       case Dismount:
+               {
+                       sprintf(TempCMD,"/dismount");
+                       EzCommand(TempCMD);
+                       return true;
+               }
+       }[/color]
        return false;
 #undef pPtr
 }
And in MQ2DataTypes.h:

Code: Select all

@@ -813,6 +813,9 @@
        };
        static enum CharacterMethods
        {
[color=red]+               Stand=1,
+               Sit=2,
+               Dismount=3,[/color]
        };
        MQ2CharacterType():MQ2Type("character")
        {
@@ -945,6 +948,10 @@
                TypeMember(CombatAbilityReady);
                TypeMember(Running);
                TypeMember(GroupSize);
[color=red]+
+               TypeMethod(Stand);
+               TypeMethod(Sit);
+               TypeMethod(Dismount);[/color]
        }

        ~MQ2CharacterType()

Re: character methods

Posted: Thu Jul 10, 2025 4:40 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 4:41 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 4:42 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 4:43 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 4:44 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 5:21 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 5:23 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 5:24 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 6:01 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 6:02 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 6:03 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 6:04 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 6:05 pm
by xyilla

Re: character methods

Posted: Thu Jul 10, 2025 6:07 pm
by xyilla