EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   COMMITTED: Camershake Command Fix (https://www.eqemulator.org/forums/showthread.php?t=33611)

Akkadius 05-22-2011 06:00 PM

COMMITTED: Camershake Command Fix
 
Quick fix for Secret's Camerashake command, the command was not giving a usage when the appropriate arguments were not given.

Thanks, Akka

Code:

Index: command.cpp
===================================================================
--- command.cpp        (revision 1902)
+++ command.cpp        (working copy)
@@ -11073,8 +11073,7 @@
 {
        if(c)
        {
-
-                if(sep->arg[1][0] &&  sep->arg[2][0]);
+                if(sep->arg[1][0] &&  sep->arg[2][0])
                {
                ServerPacket *pack = new ServerPacket(ServerOP_CameraShake, sizeof(ServerCameraShake_Struct));
                memset(pack->pBuffer, 0, sizeof(pack->pBuffer));
@@ -11086,8 +11085,11 @@
                safe_delete(pack);
                return;
                }
+                else
+                {
+                c->Message(0, "Usage -- #camerashake [duration], [intensity [1-10])");
+                }
        }
-        c->Message(13, "Usage -- #camerashake [duration], [intensity [1-10])");
 }
 
 void command_disarmtrap(Client *c, const Seperator *sep)


Secrets 05-23-2011 01:24 AM

Quote:

Originally Posted by Akkadius (Post 200256)
Quick fix for Secret's Camerashake command, the command was not giving a usage when the appropriate arguments were not given.

Thanks, Akka

Code:

Index: command.cpp
===================================================================
--- command.cpp        (revision 1902)
+++ command.cpp        (working copy)
@@ -11073,8 +11073,7 @@
 {
        if(c)
        {
-
-                if(sep->arg[1][0] &&  sep->arg[2][0]);
+                if(sep->arg[1][0] &&  sep->arg[2][0])
                {
                ServerPacket *pack = new ServerPacket(ServerOP_CameraShake, sizeof(ServerCameraShake_Struct));
                memset(pack->pBuffer, 0, sizeof(pack->pBuffer));
@@ -11086,8 +11085,11 @@
                safe_delete(pack);
                return;
                }
+                else
+                {
+                c->Message(0, "Usage -- #camerashake [duration], [intensity [1-10])");
+                }
        }
-        c->Message(13, "Usage -- #camerashake [duration], [intensity [1-10])");
 }
 
 void command_disarmtrap(Client *c, const Seperator *sep)


I'll commit this when i'm not drunk, if someone doesn't beat me to it.

joligario 05-23-2011 04:20 AM

Got it for you drunkard!!

r1911


All times are GMT -4. The time now is 12:18 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.