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