feat: support Linux/ARM cross-platform build and AVA2 feature updates
- Port server core and libraries to Linux and 32-bit ARM (armhf): * Replace FreeBSD kqueue with Linux epoll in libthecore fdwatch * Fix unaligned float and 64-bit int memory stores in utils.h str_to_number to avoid ARM VFP alignment fault (SIGBUS) * Fix getopt loop variable type in main.cpp (char -> int) to eliminate infinite loop caused by default unsigned char on ARM * Add -fsigned-char and multi-architecture flags to Makefiles (x86_64 -m32, i386, and ARM armhf) * Update libsql for modern MariaDB client library (removed reconnect field) and C++20 concept/syntax compatibility * Replace Win32 xdirent with standard POSIX dirent on Unix/Linux * Include xmd5 in libthecore on non-FreeBSD platforms - AVA2 unlock features and tools: * Material stacking up to 2000 count, refine material resolution and test suites * AVA2 ticket shop and point drop configuration updates
This commit is contained in:
@@ -20,8 +20,9 @@ int main() {
|
||||
std::map<std::string,int> flags={ENTRIES};
|
||||
auto lookup=[&](const std::string& key){return flags[key];};
|
||||
auto mob=PortPointRule(lookup,false),stone=PortPointRule(lookup,true);
|
||||
assert(mob.chance==500 && mob.minimum==1 && mob.maximum==1);
|
||||
assert(stone.chance==10000 && stone.minimum==3 && stone.maximum==8);
|
||||
assert(mob.chance==5000 && mob.minimum==3 && mob.maximum==5);
|
||||
assert(stone.chance==10000 && stone.minimum==15 && stone.maximum==30);
|
||||
assert(mob.dailyCap==0 && stone.dailyCap==0);
|
||||
assert(mob.eligible(105,120));assert(!mob.eligible(104,120));
|
||||
assert(stone.eligible(120,1));assert(!stone.eligible(0,1));
|
||||
assert(!stone.eligible(120,0));
|
||||
@@ -29,6 +30,8 @@ int main() {
|
||||
assert(PortPointDropAmount(8,500,500)==0);
|
||||
assert(PortPointDropAmount(8,UINT64_MAX,500)==0);
|
||||
assert(PortPointDropAmount(8,UINT64_MAX,0)==8);
|
||||
assert(PortPointDropAmount(30,500,stone.dailyCap)==30);
|
||||
assert(PortPointDropAmount(30,1000000,stone.dailyCap)==30);
|
||||
flags["points_mob_chance"]=0;assert(!PortPointRule(lookup,false).eligible(105,120));
|
||||
flags["points_stone_chance"]=10001;assert(!PortPointRule(lookup,true).valid());
|
||||
flags["points_stone_chance"]=10000;flags["points_stone_min"]=-1;
|
||||
|
||||
Reference in New Issue
Block a user