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:
@@ -108,6 +108,18 @@ int main(){
|
||||
// Zero grants are durable results; later replay does not recalculate the cap.
|
||||
handler.m_map_lEventFlag["points_daily_cap"]=16;assert(settle(handler,r)==0 && granted()==0 && durable.coins==116);
|
||||
handler.m_map_lEventFlag["points_daily_cap"]=500;assert(settle(handler,r)==0 && granted()==0 && durable.coins==116);
|
||||
// Removing the daily cap permits new rewards even after exceeding the old
|
||||
// allowance. Committed tokens, including old zero grants, still replay once.
|
||||
durable.rewards["old_daily_total"]={1,3,8021,1000,1000};
|
||||
handler.m_map_lEventFlag["points_daily_cap"]=0;
|
||||
assert(settle(handler,r)==0 && granted()==0 && durable.coins==116);
|
||||
handler.m_map_lEventFlag["points_stone_min"]=15;
|
||||
handler.m_map_lEventFlag["points_stone_max"]=30;r.count=30;
|
||||
strcpy(r.token,"4123456789abcdef0123456789abcdef");
|
||||
assert(settle(handler,r)==0 && granted()==30 && durable.coins==146);
|
||||
assert(settle(handler,r)==0 && granted()==30 && durable.coins==146);
|
||||
strcpy(r.token,"5123456789abcdef0123456789abcdef");
|
||||
assert(settle(handler,r)==0 && granted()==30 && durable.coins==176);
|
||||
}
|
||||
'''
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
|
||||
Reference in New Issue
Block a user