multi-module cleanup: daily logs, luaalloc enable, minimap texture fix
- logsessions: switch from timestamped per-session files to daily rotation (WoWCombatLog_YYYY_MM_DD.txt), remove path pointer overwrites, persist paths across logout so redirects keep working - logging: add append file mode (openAppend) for daily log rotation - minimapicons: clear texture binding after blip render to fix stale texture with Silicon d3d9 layer - weirdperformance: enable luaalloc slab allocator (was disabled for testing) - worldmarkers: extract FN_SET_UNIT_POSITION to offsets, use lua.typeOf helper, update doc comments for renamed API - delete unused guidcache standalone test module
This commit is contained in:
@@ -100,3 +100,10 @@ pub const LEADER_GUID: usize = 0x00bc75f8;
|
||||
pub const RAID_ROSTER_ARRAY: usize = 0x00b712a8;
|
||||
pub const RAID_MEMBER_COUNT: usize = 0x00b713e0;
|
||||
pub const ROSTER_ENTRY_RANK: usize = 0x0C;
|
||||
|
||||
// =============================================================================
|
||||
// Transform and position (additional)
|
||||
// =============================================================================
|
||||
|
||||
/// SetUnitPositionAndOrientation - __fastcall(ECX=entity, EDX=pos), 1 stack param (facing).
|
||||
pub const FN_SET_UNIT_POSITION: usize = 0x00698e20;
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
//! WorldMarker(index) - place marker at cursor terrain position
|
||||
//! ClearWorldMarker(index) - remove specific marker (1-5)
|
||||
//! ClearWorldMarker() - remove all markers
|
||||
//! CanSetWorldMarkers() - returns 1 if leader/assist, nil otherwise
|
||||
//! GetWorldMarker(index) - returns x, y, z, areaId or nil
|
||||
//! CanSetWorldMarker() - returns 1 if leader/assist, nil otherwise
|
||||
//!
|
||||
//! Lua API (WorldMarkers table - internal, used by addon):
|
||||
//! WorldMarkers.SetMarkerDef(i, x, y, z, area, sender)
|
||||
//! WorldMarkers.ClearMarkerDef([index,] sender)
|
||||
//! WorldMarkers.GetMarkerDef(index) - returns x, y, z, areaId or nil
|
||||
//! WorldMarkers.SetMarkerSync(i, x, y, z, area, sender)
|
||||
//! WorldMarkers.ClearMarkerSync([index,] sender)
|
||||
|
||||
const std = @import("std");
|
||||
const hook = @import("zhook");
|
||||
@@ -388,7 +388,7 @@ fn spawnEntity(index: usize, pos: Vec3) bool {
|
||||
|
||||
/// SetUnitPositionAndOrientation - __fastcall(ECX=positionData, EDX=pos), 1 stack param.
|
||||
fn setUnitPositionAndOrientation(entity: *anyopaque, pos: *[3]f32, facing: f32) void {
|
||||
hook.call(fn (*anyopaque, *[3]f32, f32) callconv(hook.cc.fastcall) void, 0x698e20, .{ entity, pos, facing });
|
||||
hook.call(fn (*anyopaque, *[3]f32, f32) callconv(hook.cc.fastcall) void, o.FN_SET_UNIT_POSITION, .{ entity, pos, facing });
|
||||
}
|
||||
|
||||
/// Remove only the live entity for a marker slot (def untouched).
|
||||
@@ -504,9 +504,7 @@ pub fn luaClearWorldMarker(L: lua.State) callconv(.c) u32 {
|
||||
}
|
||||
|
||||
const nargs = lua.gettop(L);
|
||||
const lua_type: *const fn (lua.State, i32) callconv(hook.cc.fastcall) i32 = @ptrFromInt(0x6F3400);
|
||||
|
||||
if (nargs == 0 or lua_type(L, 1) == 0) {
|
||||
if (nargs == 0 or lua.typeOf(L, 1) == 0) {
|
||||
// No args or nil - clear all
|
||||
clearAllMarkers();
|
||||
lua.pushnumber(L, 1.0);
|
||||
|
||||
Reference in New Issue
Block a user