* output defscript logs only in debug compile
* some conf updates
This commit is contained in:
parent
dac491af3a
commit
95fce570dd
@ -26,7 +26,7 @@ reconnect=5000
|
||||
// 1 - show only known/handled
|
||||
// 2 - show only unknown/unhandled
|
||||
// 3 - show all
|
||||
showopcodes=3
|
||||
showopcodes=0
|
||||
|
||||
|
||||
// Hide opcodes which is coming very frequently?
|
||||
@ -62,8 +62,8 @@ charname=Pseuwow
|
||||
|
||||
|
||||
// Client emulation configuration
|
||||
ClientVersion=2.3.0
|
||||
ClientBuild=7561
|
||||
ClientVersion=2.3.3
|
||||
ClientBuild=7799
|
||||
ClientLanguage=enUS
|
||||
// or change to enGB, deDE, ...
|
||||
|
||||
@ -71,7 +71,7 @@ ClientLanguage=enUS
|
||||
// packets get fetched every xx msecs. default=50
|
||||
// setting this to 0 will let PseuWoW eat up all CPU power
|
||||
// 1 is a good setting for maximum network performance and lowest ping times
|
||||
NetworkSleepTime=50
|
||||
NetworkSleepTime=1
|
||||
|
||||
// defines if players may say/yell/whisper commands to PseuWoW
|
||||
// set this to 0 and PseuWoW will not react to given commands
|
||||
|
||||
@ -24,8 +24,11 @@ DefScriptPackage::DefScriptPackage()
|
||||
SetLog(printf);
|
||||
SetDebugLog(printf);
|
||||
SetErrorLog(printf);
|
||||
_DEFSC_DEBUG
|
||||
(
|
||||
hLogfile.open("DefScriptLog.txt",std::ios_base::out);
|
||||
hLogfile << "DefScript engine execution log, compilation date: " __DATE__ " " __TIME__ "\n\n" ;
|
||||
)
|
||||
_eventmgr=new DefScript_DynamicEventMgr(this);
|
||||
_InitFunctions();
|
||||
# ifdef USING_DEFSCRIPT_EXTENSIONS
|
||||
@ -38,7 +41,7 @@ DefScriptPackage::~DefScriptPackage()
|
||||
if(_eventmgr)
|
||||
delete _eventmgr;
|
||||
Clear();
|
||||
hLogfile.close();
|
||||
_DEFSC_DEBUG(hLogfile.close());
|
||||
}
|
||||
|
||||
void DefScriptPackage::Log(const char* fmt,...)
|
||||
@ -1102,12 +1105,15 @@ std::string DefScriptPackage::_NormalizeVarName(std::string vn_in, std::string s
|
||||
DefReturnResult DefScriptPackage::Interpret(CmdSet& Set)
|
||||
{
|
||||
// TODO: remove this debug block again as soon as the interpreter bugs are fixed.
|
||||
_DEFSC_DEBUG
|
||||
(
|
||||
hLogfile << "PARENT: '" << Set.caller << "'\n";
|
||||
hLogfile << "cmd = '" << Set.cmd << "'\n";
|
||||
unsigned int ctr=0;
|
||||
for(_CmdSetArgMap::iterator i=Set.arg.begin(); i!=Set.arg.end(); i++)
|
||||
hLogfile << "arg[" << ctr++ << "] = '" << i->second << "'\n";
|
||||
hLogfile << "defaultarg = '" << Set.defaultarg << "'\n\n";
|
||||
);
|
||||
|
||||
DefReturnResult result;
|
||||
|
||||
|
||||
@ -177,7 +177,7 @@ private:
|
||||
std::map<std::string,unsigned char> scriptPermissionMap;
|
||||
DefScriptFunctionTable _functable;
|
||||
_slog_func _slog,_serrorlog,_sdebuglog;
|
||||
std::fstream hLogfile;
|
||||
_DEFSC_DEBUG(std::fstream hLogfile);
|
||||
|
||||
// Usable internal basic functions:
|
||||
DefReturnResult func_default(CmdSet&);
|
||||
|
||||
@ -378,9 +378,12 @@ DefReturnResult DefScriptPackage::func_equal(CmdSet& Set)
|
||||
result=Set.defaultarg==Set.arg[0];
|
||||
|
||||
// for debugging
|
||||
_DEFSC_DEBUG
|
||||
(
|
||||
char tmp[500];
|
||||
sprintf(tmp,"DEFSCRIPT: func_equal: ['%s'=='%s'] = %s\n",Set.arg[0].c_str(),Set.defaultarg.c_str(),result?"true":"false");
|
||||
hLogfile << tmp;
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user