Subversion Repositories WoWGM

Rev

Rev 33 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
34 tristanc 1
/****************************************************************************
2
*
3
*   ClientCommands.cpp
4
*
5
*   Client game commands
6
*
7
***/
8
 
3 tristanc 9
#include "pch.h"
10
#pragma hdrstop
11
 
12
#include "ClientCommands.h"
6 tristanc 13
 
3 tristanc 14
#include <ClientDebugCommands.h>
6 tristanc 15
#include <ClientGMCommands.h>
3 tristanc 16
#include <Console/ConsoleClient.h>
17
#include <FrameScript/FrameScript.h>
18
#include <WowSvcs/ClientServices.h>
19
 
31 tristanc 20
 
3 tristanc 21
//===========================================================================
33 tristanc 22
BOOL CCommand_Beastmaster (char const* commandStr, char const* arguments) {
23
  CDataStore msg;
24
  msg.Put(CMSG_BEASTMASTER);
25
  BYTE val = SStrCmpI(arguments, "off") != 0;
26
  msg.Put(val);
27
  msg.Finalize();
28
  ClientServices_Send(&msg);
29
  return TRUE;
30
}
31
 
32
//===========================================================================
34 tristanc 33
BOOL CCommand_Bug (char const* command, char const* args) {
34
  //TODO:
35
  //ASSERT(command);
36
 
37
  unsigned int category;
38
 
39
  if (!SStrCmpI(command, "bug"))
40
    category = 0;
41
  else if (!SStrCmpI(command, "suggestion"))
42
    category = 1;
43
 
44
  if (ClientServices_Report(category, args))
45
    ConsolePrintf("%s submitted", command);
46
  else
47
    ConsolePrintf("%s submission failed", command);
48
 
49
  return TRUE;
50
}
51
 
52
//===========================================================================
53
BOOL CCommand_Godmode (const char* cmd, const char* arguments) {	
3 tristanc 54
	if (arguments && *arguments) {
55
		int enable = atoi(arguments);
56
 
57
		CDataStore msg;
58
		msg.Put(CMSG_GODMODE);
59
		msg.Put(enable);
60
		msg.Finalize();
61
 
62
		ClientServices_Send(&msg);
63
	}
31 tristanc 64
 
3 tristanc 65
	return TRUE;
66
}