Solved: how to detect despawns/monster deaths? menu

User Tag List

Results 1 to 3 of 3
  1. #1
    mrwizeman's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Solved: how to detect despawns/monster deaths?

    anyone care to share an address for "OnRemoveSpawn", or knows which packet tells the client to remove a dead npc?

    Is it in the SMSG_COMPRESSED_UPDATE_OBJECT packet perhaps? I can decompress it if needed, but I dont wanna mess with it if its gonna be a dead end.

    Is there an event for it?

    I dont want to iterate through the objectmanager and keep track of all the guids unless its absolutely necasary, so please, if you know of a function that gets called when a npc despawns, feel free to reply.
    Last edited by mrwizeman; 10-27-2009 at 03:20 PM. Reason: Changed title to reflect problem solved.

    Solved: how to detect despawns/monster deaths?
  2. #2
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WoWUnit should have a virtual destructor. You could hook that if you want, that should tell you when an NPC or PC is being destroyed.

  3. #3
    mrwizeman's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the answer, it got me to fire up olly and set a bp on UNIT_DIED from thereon it was easy to trace back to the function I needed namely 0x06C4FF0
    OnUnitDied as I call it and when it gets called it has the objptr to the unit that just died in ecx...
    Guid is found at ecx+0x30 and unitname is a pointer at ecx+0x38 at ecx+0xc have the number 0x2c which is used in a case statement in the jumptable at 1052A10 and no surprise... it will resolve to UNIT_DEAD...

    Code:
    text:006C503D                 mov     ecx, [edi+0Ch]
    .text:006C5040                 mov     edx, off_1052A10[ecx*4]
    Anyway now when I look at it in IDA I see that I should be able to just grab the death directly from the packet...
    so anyway if someone else ever asks about this here is the codesnippet from version 3.2.2.10505 that should be enough info to get a solid OnDeath function working...

    Code:
    .text:0047A410 ClntObjMgrInitialize proc near          ; CODE XREF: ClntObjMgrCreate+77p
    .text:0047A410                 mov     eax, TlsIndex
    .text:0047A415                 mov     ecx, large fs:2Ch
    .text:0047A41C                 push    esi
    .text:0047A41D                 mov     esi, [ecx+eax*4]
    .text:0047A420                 mov     edx, [esi+8]
    .text:0047A426                 mov     ecx, [edx+0D0h]
    .text:0047A42C                 push    0
    .text:0047A42E                 push    offset Packet_SMSG_UPDATE_OBJECT
    .text:0047A433                 push    0A9h
    .text:0047A438                 call    NetClient__SetMessageHandler
    .text:0047A43D                 mov     eax, [esi+8]
    .text:0047A443                 mov     ecx, [eax+0D0h]
    .text:0047A449                 push    0
    .text:0047A44B                 push    offset Packet_SMSG_COMPRESSED_UPDATE_OBJECT
    .text:0047A450                 push    1F6h
    .text:0047A455                 call    NetClient__SetMessageHandler
    .text:0047A45A                 mov     ecx, [esi+8]
    .text:0047A460                 mov     ecx, [ecx+0D0h]
    .text:0047A466                 push    0
    .text:0047A468                 push    offset Packet_SMSG_DESTROY_OBJECT
    .text:0047A46D                 push    0AAh
    .text:0047A472                 call    NetClient__SetMessageHandler
    .text:0047A477                 pop     esi
    .text:0047A478                 retn
    .text:0047A478 ClntObjMgrInitialize endp
    

Similar Threads

  1. How blizzard detects AHK
    By wikiwika in forum Overwatch Exploits|Hacks
    Replies: 20
    Last Post: 08-23-2016, 08:02 PM
  2. How to not get a death on your stat list in EotS
    By hordewarrior in forum World of Warcraft Exploits
    Replies: 17
    Last Post: 03-09-2008, 07:50 PM
  3. How to create custom monsters for your server!
    By renitharis in forum WoW EMU Guides & Tutorials
    Replies: 13
    Last Post: 12-10-2007, 07:53 PM
  4. try and win a glider key and a exploit on how to loot a monster 2 times
    By cycoaustin in forum World of Warcraft Exploits
    Replies: 49
    Last Post: 05-24-2007, 12:56 AM
  5. How to Detect Invisable Walls
    By idusy-org in forum World of Warcraft Exploration
    Replies: 3
    Last Post: 12-26-2006, 01:06 PM
All times are GMT -5. The time now is 06:27 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search