Subversion Repositories WoWGM

Rev

Rev 11 | Rev 31 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 21
Line 23... Line 23...
23
	DETOUR_COMMIT;
23
	DETOUR_COMMIT;
24
 
24
 
25
	ConsoleCommandUnregister("new");
25
	ConsoleCommandUnregister("new");
26
	ConsoleCommandUnregister("run");
26
	ConsoleCommandUnregister("run");
27
	ConsoleCommandUnregister("end");
27
	ConsoleCommandUnregister("end");
-
 
28
	ConsoleCommandUnregister("ver");
28
 
29
 
29
	// Call the original function
30
	// Call the original function
30
	ConsoleCommandDestroyPtr();
31
	ConsoleCommandDestroyPtr();
31
}
32
}
32
 
33
 
Line 262... Line 263...
262
		ConsoleCommandWriteHelp(command);
263
		ConsoleCommandWriteHelp(command);
263
	}
264
	}
264
	return result;
265
	return result;
265
}
266
}
266
 
267
 
-
 
268
//===========================================================================
-
 
269
BOOL ConsoleCommand_Ver (LPCSTR command, LPCSTR args) {
-
 
270
#ifdef NDEBUG
-
 
271
	ConsoleWriteA("WoW [Release] Build 12340 (%s)", DEFAULT_COLOR, __DATE__);
-
 
272
#else
-
 
273
	ConsoleWriteA("WoW [Debug] Build 12340 (%s)", DEFAULT_COLOR, __DATE__);
-
 
274
#endif
-
 
275
	return TRUE;
-
 
276
}
-
 
277
 
267
 
278
 
268
/****************************************************************************
279
/****************************************************************************
269
*
280
*
270
*	External functions
281
*	External functions
271
*
282
*
Line 278... Line 289...
278
	// so only setup a trampoline for ConsoleCommandDestroy()
289
	// so only setup a trampoline for ConsoleCommandDestroy()
279
	DETOUR_INIT;
290
	DETOUR_INIT;
280
	DETOUR_ATTACH(ConsoleCommandDestroyPtr,ConsoleCommandDestroy);
291
	DETOUR_ATTACH(ConsoleCommandDestroyPtr,ConsoleCommandDestroy);
281
	DETOUR_COMMIT;
292
	DETOUR_COMMIT;
282
 
293
 
-
 
294
	// Replace the client's "ver" command
-
 
295
	ConsoleCommandUnregister("ver");
-
 
296
	ConsoleCommandRegister("ver",ConsoleCommand_Ver,DEFAULT,NOHELP); 
-
 
297
 
283
	ConsoleCommandRegister("new",ConsoleCommand_CreateExec,CONSOLE,"[File Name] starts recording a new script");
298
	ConsoleCommandRegister("new",ConsoleCommand_CreateExec,CONSOLE,"[File Name] starts recording a new script");
284
	ConsoleCommandRegister("run",ConsoleCommand_RunExec,CONSOLE,"[File Name] Runs a wtf file from the WTF folder");
299
	ConsoleCommandRegister("run",ConsoleCommand_RunExec,CONSOLE,"[File Name] Runs a wtf file from the WTF folder");
285
	ConsoleCommandRegister("end",ConsoleCommand_CloseExec,CONSOLE,"Stops recording script");
300
	ConsoleCommandRegister("end",ConsoleCommand_CloseExec,CONSOLE,"Stops recording script");
286
}
301
}