Rev 34 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/******************************************************************************
*
* ClientCommands.cpp
*
*
* By Tristan Cormier - 11/20/2024
*
***/
#include "pch.h"
#pragma hdrstop
#include "ClientCommands.h"
#include <ClientDebugCommands.h>
#include <ClientGMCommands.h>
#include <Console/ConsoleClient.h>
#include <FrameScript/FrameScript.h>
#include <WowSvcs/ClientServices.h>
/******************************************************************************
*
* Exports
*
***/
//=============================================================================
BOOL CCommand_Beastmaster (char const * commandStr, char const * arguments) {
bool enable = SStrCmpI(arguments, "off") != 0;
CDataStore msg;
msg.Put(CMSG_BEASTMASTER);
msg.Put(enable);
msg.Finalize();
ClientServices_Send(&msg);
return TRUE;
}
//=============================================================================
BOOL CCommand_Bug (char const * commandStr, char const * arguments) {
unsigned int category;
if (!SStrCmpI(commandStr, "bug"))
category = 0;
else if (!SStrCmpI(commandStr, "suggestion"))
category = 1;
if (ClientServices_Report(category, arguments))
ConsolePrintf("%s submitted", commandStr);
else
ConsolePrintf("%s submission failed", commandStr);
return TRUE;
}
//=============================================================================
BOOL CCommand_Godmode (char const * commandStr, char const * arguments) {
if (arguments && *arguments) {
int enable = atoi(arguments);
CDataStore msg;
msg.Put(CMSG_GODMODE);
msg.Put(enable);
msg.Finalize();
ClientServices_Send(&msg);
}
return TRUE;
}
//===================================
// MIT License
//
// Copyright (c) 2024 by Tristan Cormier
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//===================================
Generated by GNU Enscript 1.6.5.90.