-
Contributor
Avid Ailurophile
-
Post Thanks / Like - 3 Thanks
-
Active Member
Offsets appear to check out on my end, nice. A few (spellbook.base/count, spellbot.pet_base/count) appear to be flipped, but that is probably just a mistake on my end. Not using them right now so can't verify.
One thing I'm curious about - the data type behind screen_size @ 0x2C25D70. I would think it's a pair of float32's behind a pointer but those are some wild numbers I am getting out. Attempting to reverse GetScreenWidth/GetScreenHeight now to figure it out.
Perhaps that's a bad idea? Would like to not hardcode a screen rect of x/y/w/h points.
-
-
Post Thanks / Like - 1 Thanks
klumpen (1 members gave Thanks to Razzue for this useful post)
-
Active Member
Originally Posted by
Razzue
BUT they go by wow UI size iirc
That's a great insight - thank you. No point in chasing it down
-
Contributor
Originally Posted by
klumpen
Offsets appear to check out on my end, nice. A few (spellbook.base/count, spellbot.pet_base/count) appear to be flipped, but that is probably just a mistake on my end. Not using them right now so can't verify.
One thing I'm curious about - the data type behind screen_size @ 0x2C25D70. I would think it's a pair of float32's behind a pointer but those are some wild numbers I am getting out. Attempting to reverse GetScreenWidth/GetScreenHeight now to figure it out.
Perhaps that's a bad idea? Would like to not hardcode a screen rect of x/y/w/h points.
What is it exactly you're looking for? Your value for 0x2C25D70 appears to be a struct/class and not what you're talking about. If you look at functions like GetScreenWidth, they are multiplying a set factor value by screen compensation values. GetScreenWidth is a good one to pull that screen compensation value, which can later be used for the WorldToViewport function if you're trying to do world to screen values. If you've ever read the description for the GetScreenX functions, they don't return the actual width/height. Using something like GetClientRect will give you that value easily if you're looking for the clients x/y. Or you can call it initially for a global value, and then update that on the WndProc for screen sizing/changing (this is what I do in my world to screen). In older wow clients you had the DDCToNDC which use that compensation, which is now just inlined in the world to screen functions. F3 0F 59 05 X ? ? ? ? F3 0f 11 06 48 85 FF is the pattern I use (X being the relative location for the pointer to the screen ration compensation struct of 2 floats; x/y). Here's the pseudocode:
Code:
void DDCToNDC(float inx, float iny, float* outx, float* outy) {
if (outx)
*outx = inx / g_screen_ratio_compensation->x;
if (outy)
*outy = iny / g_screen_ratio_compensation->y;
}
bool world_to_screen(Vec3 in, Vec2* out, bool from_lua) {
Vec2 temp{0.f, 0.f};
auto onscreen = CGWorldFrame__GetScreenCoordinates(*g_CurFrame, &in, &temp, 1);
if (from_lua) {
auto x = 0.f;
auto y = 0.f;
DDCToNDC(temp.x, temp.y, &x, &y);
out->x = x;
out->y = y;
}
else {
RECT rect = client_rect;
auto height = rect.bottom - rect.top;
auto width = rect.right - rect.left;
auto x = 0.f;
auto y = 0.f;
DDCToNDC(temp.x, temp.y, &x, &y);
x = x * width;
y = height - (y * height);
out->x = x;
out->y = y;
}
return onscreen;
}
Hopefully I'm of some help with this and not just throwing random stuff out. In wow I call it WorldToViewport because it returns a percentage of the width/height at what the point was. Used in lua:
Code:
local function WorldToScreen(sx, sy, sz)
local _, x, y = WorldToViewport(sx, sy, sz)
local scale = UIParent:GetScale()
x = x * UIParent:GetWidth() * scale
local height = UIParent:GetHeight() * scale
y = height - (y * height)
return x, -y
end
-
Post Thanks / Like - 1 Thanks
klumpen (1 members gave Thanks to scizzydo for this useful post)
-
Contributor
Avid Ailurophile
-
Contributor
From the example given above, here's the g_CurFrame
Code:
48 8B 1D X ? ? ? ? 48 85 Db 74 20 48 8B 8B ? ? ? ? 48 85 C9
And the CGWorldFrame__GetScreenCoordinates:
Code:
E8 X ? ? ? ? 48 8B 4B ? 4C 8D 43 ? 41 B1 01
Please note that they are relative address scans, so make sure you take out that 'X' as thats what I use in my pattern scanner to capture where I'm getting the relative address from. But that's where you get the value you want
-
Active Member
Originally Posted by
scizzydo
Hopefully I'm of some help with this and not just throwing random stuff out.
That was most helpful, thanks!
To answer the question of what exactly I'm looking for - the client rect for w2s as I'm not in a context where I have the GetClientRect method readily available. I had hoped the dimensions were available in the process memory.
Though there's a workaround or two that I can employ, so it's not the end of the world. And eventually I'm going to have to drop some code onto the game host anyway, so.
In the spirit of sharing & for reference, this is the w2s code I'm running with. Seems to work OK so far.
Code:
pub fn world_to_screen(src: Vec3A, dst: Vec3A, mat: Mat3A, rect: Vec4, fov: f32) -> Vec2 {
let diff = dst-src;
if diff.dot(mat.col(0)) < 0.0 { return }
let inverse = Mat4::from_mat3a(mat.inverse());
let screen = Vec2::new((rect.z-rect.x)/2, (rect.w-rect.y)/2);
let aspect = Vec2::new(
screen.x / (((camera_fov * 55.0) / 2.0).to_radians()).tan(),
screen.y / (((camera_fov * 35.0) / 2.0).to_radians()).tan(),
);
let view = inverse.project_point3(diff);
let cam = Vec3::new(-view.y, -view.z, view.x);
let x = screen.x + cam.x * aspect.x / cam.z;
let y = screen.y + cam.y * aspect.y / cam.z;
if x < rect.x || y < rect.y || x > rect.z || y > rect.w {
return Vec2::ZERO;
}
return Vec2 { x, y };
}
Originally Posted by
Razzue
Well I wouldn't say "No point"
...
Fair point. Hadn't considered clicking around the UI, figured a keyboard & some macros/addons would satisfy the need of interacting with the UI.
Last edited by klumpen; 05-01-2023 at 04:04 PM.
-
Contributor
you sure doesn't still exist ? i could recall it still had a offset
-
Active Member
Fiddling with updating fields.
The hp/max_hp ones I have been using seem to both point to current_hp :thinking: (0xD560, 0xD680).
What works is 0xD680 & 0xD688, for me anyway. Seeing a lot of 0xD568 references as well, haven't checked it though.
Set of two sigs I've used to find both. Curious to hear what if any results you see.
Code:
hp = "0F 57 C0 F2 48 0F 2A 89 u4 F2 48 0F 2A 81 ? ? ? ? F2 0F 5E C8"
max_hp = "0F 57 C0 F2 48 0F 2A 89 ? ? ? ? F2 48 0F 2A 81 u4 F2 0F 5E C8"
Alternative sig, found the two offsets at another loc. Think this might be better, I don't have high hopes for the one above.
Code:
hp_field = "40 57 48 83 EC ? 48 89 74 24 ? 48 8B F9 E8 ? ? ? ? 0F 57 C9 0F 57 C0 F2 48 0F 2A 8F u4 F2 48 0F 2A 87 ? ? ? ? F2 0F 5E C8 66 0F 5A C9 0F 2F 0D ? ? ? ? 73 21 48 8B 07 48 8B CF FF 90 ? ? ? ? 84 C0 75 11 48 83 BF ? ? ? ? ? 74 07 83 8F ? ? ? ? ? 48 8B 77 ? 83 A7 ? ? ? ? ? 48 8B CE E8 ? ? ? ? 48 8B 4F ? 48 85 C9 74 1A E8 ? ? ? ? 48 85 C0 74 10 48 8B 4F ? 48 8B 89 ? ? ? ? E8 ? ? ? ? 48 8B CF E8 ? ? ? ? F7 87 ? ? ? ? ? ? ? ? 75 22 48 89 5C 24 ? 48 8D 4F ? 48 8B 5F ? E8 ? ? ? ? 48 8B D0 48 8B CB E8 ? ? ? ? 48 8B 5C 24 ? 33 D2 48 8B CF E8 ? ? ? ? 8B 97 ? ? ? ? 48 8B CE E8 ? ? ? ? 8B 97 ? ? ? ? 48 8B 4F ? 85 D2 75 0D 48 C7 81 ? ? ? ? ? ? ? ? EB 0C 4C 8B 87 ? ? ? ? E8 ? ? ? ? 48 8B CF E8 ? ? ? ? 48 8B 07 48 8B CF FF 90 ? ? ? ? 85 C0 75 09 48 8D 4E ? E8 ? ? ? ? 48 83 BF ? ? ? ? ? 48 8B 74 24 ? 7F 28 83 BF ? ? ? ? ? 75 1F E8 ? ? ? ? 89 87 ? ? ? ? 33 D2 48 8B 07 48 8B CF 48 83 C4 ? 5F 48 FF A0 ? ? ? ? 48 83 C4 ? 5F C3"
max_hp_field = "40 57 48 83 EC ? 48 89 74 24 ? 48 8B F9 E8 ? ? ? ? 0F 57 C9 0F 57 C0 F2 48 0F 2A 8F ? ? ? ? F2 48 0F 2A 87 u4 F2 0F 5E C8 66 0F 5A C9 0F 2F 0D ? ? ? ? 73 21 48 8B 07 48 8B CF FF 90 ? ? ? ? 84 C0 75 11 48 83 BF ? ? ? ? ? 74 07 83 8F ? ? ? ? ? 48 8B 77 ? 83 A7 ? ? ? ? ? 48 8B CE E8 ? ? ? ? 48 8B 4F ? 48 85 C9 74 1A E8 ? ? ? ? 48 85 C0 74 10 48 8B 4F ? 48 8B 89 ? ? ? ? E8 ? ? ? ? 48 8B CF E8 ? ? ? ? F7 87 ? ? ? ? ? ? ? ? 75 22 48 89 5C 24 ? 48 8D 4F ? 48 8B 5F ? E8 ? ? ? ? 48 8B D0 48 8B CB E8 ? ? ? ? 48 8B 5C 24 ? 33 D2 48 8B CF E8 ? ? ? ? 8B 97 ? ? ? ? 48 8B CE E8 ? ? ? ? 8B 97 ? ? ? ? 48 8B 4F ? 85 D2 75 0D 48 C7 81 ? ? ? ? ? ? ? ? EB 0C 4C 8B 87 ? ? ? ? E8 ? ? ? ? 48 8B CF E8 ? ? ? ? 48 8B 07 48 8B CF FF 90 ? ? ? ? 85 C0 75 09 48 8D 4E ? E8 ? ? ? ? 48 83 BF ? ? ? ? ? 48 8B 74 24 ? 7F 28 83 BF ? ? ? ? ? 75 1F E8 ? ? ? ? 89 87 ? ? ? ? 33 D2 48 8B 07 48 8B CF 48 83 C4 ? 5F 48 FF A0 ? ? ? ? 48 83 C4 ? 5F C3"
---
power_type (0:mana, 1:rage, etc) @ 0xD778. Found this through reclassing the live client and poking around the unit flags/race/class/gender. Couldn't find a pattern nor manage to reverse GetUnitPowerType.
Code:
power_type = "0F B6 41 ? 4C 8D 0D A5 2F BC FE 41 F6 84 81 ? ? ? ? ? 74 1D 0F B6 81 ? ? ? ? FF C8 48 0F BE CA 4C 6B C0 ? 4C 03 C1 43 8B 84 81 ? ? ? ? C3 3A 91 u4 75 03 33 C0 C3 80 FA ? 75 06 B8 ? ? ? ? C3 80 FA ? 75 06 B8 ? ? ? ? C3 80 FA ? B8 FF FF FF FF B9 ? ? ? ? 0F 44 C1 C3"
Last edited by klumpen; 05-08-2023 at 07:02 AM.
-
Contributor
0x2C88BF0 PowerIndexArrays
-
Established Member
Code:
warning: Reading "C:\\Program Files (x86)\\World of Warcraft\\_classic_\\WowClassic_unpacked.exe"
warning: Adding pub const FN_START_JUMP: usize = 0xF27980;
warning: Adding pub const FN_SPELL_MIN_MAX_RANGE: usize = 0x138DF00;
warning: Adding pub const FN_SPELL_HAS_POWER: usize = 0x13944C0;
warning: Adding pub const FN_SPELL_COOLDOWN: usize = 0x13904F0;
warning: Adding pub const FN_SPELL_IS_USABLE: usize = 0x13980A0;
warning: Adding pub const FN_IS_DEAD_OR_GHOST: usize = 0x195CA20;
warning: Adding pub const FN_START_ATTACK: usize = 0x144BC80;
warning: Adding pub const FN_SET_CONTROL_BIT: usize = 0x11EA7C0;
warning: Adding pub const FN_UNSET_CONTROL_BIT: usize = 0x11EB770;
warning: Adding pub const FN_UPDATE_PLAYER: usize = 0x11EBE80;
warning: Adding pub const S_CONTROL_INPUT: usize = 0x2873390;
warning: Adding pub const FN_FACE_TO: usize = 0xF27DE0;
warning: Adding pub const OBJECT_MANAGER: usize = 0x2CDB870;
warning: Adding pub const GAME_STATE: usize = 0x2CDC680;
warning: Adding pub const ACTIVE_PLAYER_GUID: usize = 0x2C26250;
warning: Adding pub const S_TARGET_GUID: usize = 0x29ED2C0;
warning: Adding pub const ACTIVE_BAG_GUIDS: usize = 0x2D58C90;
warning: Adding pub const WORLD_FRAME: usize = 0x2C02158;
warning: Adding pub const FN_GET_SCREEN_INFO: usize = 0x11C2520;
warning: Adding pub const FN_GET_SCREEN_COORDINATES: usize = 0x1133310;
warning: Adding pub const FN_FIND_SPELL_ID_BY_NAME: usize = 0x160DDD0;
warning: Adding pub const FN_FIND_SPELL_SLOT_BY_ID: usize = 0x160DBC0;
warning: Adding pub const FN_CAST_SPELL_BY_SLOT: usize = 0x160BE20;
warning: Adding pub const FN_IS_CURRENT_SPELL: usize = 0x1397C70;
warning: Adding pub const SPELL_BOOK: usize = 0x2D0F850;
warning: Adding pub const FN_USE_ITEM: usize = 0x14BB9F0;
warning: Adding pub const USE_ITEM_PARAM: usize = 0x2C76340;
warning: Adding pub const LAST_HARDWARE_EVENT: usize = 0x29EA7A8;
warning: Adding pub const GAME_TIME: usize = 0x29ECF80;
warning: Adding pub const FN_LOOT_SLOT: usize = 0x1642E50;
warning: Adding pub const S_LOOT_WINDOW: usize = 0x2D107B0;
warning: Adding pub const S_SELECTED_ITEM_GUID: usize = 0x2CDB8F8;
warning: Adding pub const S_MERCHANT: usize = 0x2D1BAB8;
warning: Adding pub const S_MERCHANT_GUID: usize = 0x0;
warning: Adding pub const FN_MERCHANT_BUY_ITEM: usize = 0x13E0FF0;
warning: Adding pub const FN_MERCHANT_SELL_ITEM: usize = 0x13DBBF0;
warning: Adding pub const S_ACTIVE_MAP_ID: usize = 0x288539C;
Fields
Code:
pub mod object_manager {
pub const BUCKET_COUNT: usize = 0x00;
pub const BUCKETS: usize = 0x08;
pub const OBJECT_COUNT: usize = 0x10;
pub const ZONE_NAME: usize = 0x60;
pub const SUBZONE_NAME: usize = 0x68;
}
pub mod bucket {
pub const NEXT: usize = 0x00;
pub const VALUE: usize = 0x18;
}
pub mod cgobject {
pub const OBJECT_TYPE: usize = 0x10;
pub const GUID: usize = 0x18;
pub const ENTRY_ID: usize = 0xD8;
}
pub mod cgmovement {
pub const CURRENT_SPEED: usize = 0x1A8;
pub const RUN_SPEED: usize = 0x1B0;
}
pub mod cgunit {
pub const CASTING_SPELL_ID: usize = 0x6F0;
pub const CHANNELING_SPELL_ID: usize = 0x748;
pub const ACTIVE_MOVER: usize = 0x128;
pub const ROTATION: usize = 0x158;
pub const MOVEMENT: usize = 0xF0;
pub const TARGET_GUID: usize = 0xD740;
pub const AURA_COUNT: usize = 0x850;
pub const AURAS: usize = 0x858;
pub const POWER_TYPE: usize = 0xD778;
pub const CURRENT_HEALTH: usize = 0xD680;
pub const MAX_HEALTH: usize = 0xD688;
pub const PRIMARY_POWER: usize = 0xD568;
pub const SECONDARY_POWER: usize = 0xD56C;
pub const SPECIAL_POWER: usize = 0xD570;
pub const COMBAT_RANGE: usize = 0xD7C0;
pub const UNIT_FLAGS: usize = 0xD7A8;
pub const LEVEL: usize = 0xD780;
}
pub mod cgaura {
pub const SIZE_OF: usize = 0xB0;
pub const SPELL_ID: usize = 0x88;
}
pub mod cgactiveplayer {
pub const INVENTORY_SLOT_COUNT: usize = 0x12830;
pub const INVENTORY_GUIDS: usize = 0x12838;
pub const SKILL_LINES: usize = 0xE5C4;
pub const SKILL_MAX_LEVELS: usize = 0xEDC4;
pub const SKILL_LEVELS: usize = 0xE9C4;
pub const EXPERIENCE: usize = 0xE5B8;
pub const NEXT_LEVEL_EXPERIENCE: usize = 0xE5BC;
}
pub mod cggameobject {
pub const CREATOR_GUID: usize = 0x0210;
pub const ANIMATING: usize = 0xA0;
}
pub mod cgcontainer {
pub const SLOT_COUNT: usize = 0x6C0;
pub const ITEM_GUIDS: usize = 0x468;
}
pub mod screen_info {
pub const HEIGHT: usize = 0x0E;
pub const WIDTH: usize = 0x0C;
}
pub mod world_frame {
pub const FOV_X: usize = 0x18C;
pub const FOV_Y: usize = 0x188;
}
pub mod loot_window {
pub const FLAG: usize = 0x1688;
pub const COUNT: usize = 0x0A08;
pub const FLAGGED_ENTRIES: usize = 0x0A10;
pub const UNFLAGGED_ENTRIES: usize = 0x0A08;
}
pub mod loot_window_item {
pub const SIZE_OF: usize = 0xC8;
pub const STACK_COUNT: usize = 0x04;
pub const QUALITY: usize = 0x88;
pub const ENTRY_ID: usize = 0x10;
}
pub mod merchant {
pub const ITEMS: usize = 0x00;
pub const ITEM_COUNT: usize = 0x08;
}
pub mod merchant_item {
pub const SIZE_OF: usize = 0xA0;
pub const ENTRY_ID: usize = 0x28;
}
Code:
pub mod cgobject {
pub const HEIGHT: usize = 14;
pub const NAME: usize = 15;
pub const POSITION: usize = 61;
pub const INTERACT_WITH: usize = 93;
}
pub mod cgunit {
pub const IS_DEAD: usize = 78;
}
-
Post Thanks / Like - 1 Thanks
klumpen (1 members gave Thanks to _chase for this useful post)
-
Active Member
messing about with reducing the number of individual reads per tick by way of larger structs. holy crap is 'cgunit'/'unit_fields'/'unit_info' a beast.
feelscraft tells me there be pointers to chase down to these "auxiliary" structs a half-mile away from the root address.
Code:
| 0 | _pad1 | 216 | 0x0
| 216 | unit_id | 4 | 0xD8
| 220 | dynamic_flag | 1 | 0xDC
| 221 | _pad2 | 19 | 0xDD
| 240 | movement | 8 | 0xF0
| 248 | _pad4 | 48 | 0xF8
| 296 | active_mover | 4 | 0x128
| 300 | _pad5 | 28 | 0x12C
| 328 | position | 12 | 0x148
| 340 | _pad6 | 988 | 0x154
| 1328 | info | 8 | 0x530
| 1336 | _pad16 | 476 | 0x538
| 1812 | cast_id | 4 | 0x714
| 1816 | _pad15 | 40 | 0x718
| 1856 | cast_start | 4 | 0x740
| 1860 | cast_end | 4 | 0x744
| 1864 | chan_id | 4 | 0x748
| 1868 | _pad14 | 4 | 0x74C
| 1872 | chan_start | 4 | 0x750
| 1876 | chan_end | 4 | 0x754
| 1880 | _pad8 | 248 | 0x758
| 2128 | aura_count | 4 | 0x850
| 2132 | _pad20 | 4 | 0x854
| 2136 | auras | 8 | 0x858
| 2144 | _pad9 | 52488 | 0x860
| 54632 | primary_power | 4 | 0xD568
| 54636 | secondary_power | 4 | 0xD56C
| 54640 | special_power | 4 | 0xD570
| 54644 | _pad10 | 268 | 0xD574
| 54912 | health | 4 | 0xD680
| 54916 | _pad11 | 4 | 0xD684
| 54920 | max_health | 4 | 0xD688
| 54924 | _pad12 | 44 | 0xD68C
| 54968 | npc_flag | 4 | 0xD6B8
| 54972 | _pad18 | 68 | 0xD6BC
| 55040 | summoner | 4 | 0xD700
| 55044 | _pad19 | 12 | 0xD704
| 55056 | creator | 16 | 0xD710
| 55072 | _pad21 | 84 | 0xD720
| 55156 | race | 1 | 0xD774
| 55157 | class | 1 | 0xD775
| 55158 | unk_u8_1 | 1 | 0xD776
| 55159 | gender | 1 | 0xD777
| 55160 | power_type | 1 | 0xD778
| 55161 | _pad22 | 7 | 0xD779
| 55168 | level | 1 | 0xD780
| 55169 | _pad23 | 35 | 0xD781
| 55204 | faction | 4 | 0xD7A4
| 55208 | unit_flag_one | 4 | 0xD7A8
| 55212 | unit_flag_two | 4 | 0xD7AC
| 55216 | unit_flag_three | 4 | 0xD7B0
| 55220 | _pad24 | 12 | 0xD7B4
| 55232 | combat_range | 4 | 0xD7C0
| 55236 | _pad25 | 12 | 0xD7C4
| 55248 | mount_id | 4 | 0xD7D0
| 55252 | _pad26 | 460 | 0xD7D4
| 55712 | power | 4 | 0xD9A0
| 55716 | _pad27 | 24 | 0xD9A4
| 55740 | max_power | 4 | 0xD9BC
Last edited by klumpen; 05-12-2023 at 07:58 AM.
-
Member
Guys, but no one will help with the Current_Accaunt offset?
In theory, this should be a string containing an email address, but no matter how much I torture the cheat engine, I just can’t find a constant offset (
Tried on another account, does not find anything at all, most likely impossible (
I need a way to find at least some kind of account identifier, I will look
Last edited by Hrap; 05-16-2023 at 03:07 AM.
-
-
Post Thanks / Like - 2 Thanks