Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(573 Kb)
Download
Updated: 06-25-15 12:18 PM
Pictures
File Info
Compatibility:
Warlords of Draenor Pre-Patch (6.0.2)
Updated:06-25-15 12:18 PM
Created:07-24-13 12:11 AM
Downloads:2,699
Favorites:14
MD5:

KillingBlow Enhanced

Version: 1.15
by: Choonstertwo [More]

Description
This AddOn shows an image and plays a sound when you get a killing blow. When in a battleground, only killing blows on players are recorded; but all killing blows are recorded outside of battlegrounds.

You can configure the AddOn by editing the options at the top of core.lua in a text editor. This lets you enable/disable the printing of your current KB total to the chat frame and choose whether the AddOn works everywhere or only in BGs.

You can also change the texture and the sound. The AddOn includes three textures: an Alliance crest, a Horde crest and a picture of the Horde/Alliance battleground flags.

The KB total is reset whenever you go through a loading screen (e.g. when you enter/leave a battleground).

Source Code
You can view the AddOn's source code on GitHub.

Credits
Thanks OligoFriends of Curse/WoWI for the original concept and the art/sound design.

Thanks to whitefreli for contributing the KillingBlow_HordeSword texture.

Thanks to nightcracker for ncKillingBlow, which showed me which event fires for killing blows.

1.15
  • Rewrite PvP detection code with FFA PvP support
    -- Based on BankNorris' code here
  • Change World PvP sessionType to "world" in SavedVariables
  • Add "ffa" sessionType for Free for All PvP
  • Unregister ADDON_LOADED after it fires for this AddOn
  • Add CREDITS.md to keep track of people who helped with the AddOn

1.14
  • Avoid changing current map zone where possible. Map zone will still be changed when entering a new zone in Northrend as this is required to detect if the player is in Wintergrasp.
  • Update PvP zone status, start/end sessions and reset kill count when the player enters a new zone (ZONECHANGEDNEWAREA) instead of when they enter a new instance/continent (PLAYERENTERING_WORLD)

1.13
  • Add support for World PvP zones in PVP_ONLY mode

1.12
  • Add AddOn to AddOn Packager Proxy

1.11
  • New version to fix Git/CurseForge packager screw-up

1.10
  • Add KillingBlow_Death texture by OligoFriends

1.09
  • Add KillingBlow_HordeSword texture by whitefreli

1.08
  • Change player GUID check to reflect new GUID format
  • Now searches for the string "Player-" instead of using bitwise operations

1.07
  • Update to 6.0
  • Convert KillingBlow.mp3 to Ogg format (WoW doesn't play custom MP3s any more)
  • Bump TOC version
  • Register ADDON_LOADED properly
  • Save PvP killing blows to be exported to CSV

1.06
  • Change overkill check to >0 instead of >=0
    • It seems a recent patch may have changed the overkill argument of COMBATLOGEVENT_UNFILTERED to be 0 instead of -1 for non-killing blows

1.05
  • Add new Horde/Alliance texture by OligoFriends

1.04
  • Update TOC Interface tag to 5.4
  • Update comment in CLEU to reflect PVP_ONLY change
  • Change BGONLY option to PVPONLY (arenas + BGs)
  • Add UnitFactionGroup to globals listing

1.03
  • Possible fix for "bad argument #1 to 'band'"

1.02
  • Add separate KB textures for each faction
    • Alliance uses existing texture (renamed to KillingBlowAlliance.tga Horde uses the new KillingBlowHorde.tga (by OligoFriends)
    • Move the texture:SetTexture call to the first firing of PLAYERENTERINGWORLD so UnitFactionGroup can return accurate results
  • Rename frame to KillingBlow_EnhancedFrame (was KillingBlowImageFrame, from the AddOn's old name)

1.01
  • Fix tools-used entry
  • Record KBs for units controlled by the player
  • Record KBs on DAMAGE events with an overkill argument >= 0 in addition to PARTYKILL
    • Suggested by Caellian because PARTY_KILL apparently doesn't fire correctly sometimes
  • Add globals list and tools-used entry for mikk's FindGlobals script
  • Re-encode core.lua as UTF-8 without BOM so luac will work
  • Add download info to README.md
Optional Files (0)


Archived Files (12)
File Name
Version
Size
Author
Date
1.14
572kB
Choonstertwo
06-15-15 08:56 AM
1.13
572kB
Choonstertwo
06-15-15 05:31 AM
1.12
571kB
Choonstertwo
05-07-15 05:06 AM
1.09
401kB
Choonstertwo
10-20-14 06:58 PM
1.08
322kB
Choonstertwo
10-18-14 03:41 AM
1.07
322kB
Choonstertwo
10-18-14 02:34 AM
1.05
319kB
Choonstertwo
01-22-14 04:31 AM
1.04
225kB
Choonstertwo
01-05-14 03:56 AM
1.03
225kB
Choonstertwo
09-03-13 07:31 AM
1.02
225kB
Choonstertwo
07-28-13 07:17 AM
1.01
122kB
Choonstertwo
07-25-13 12:27 AM
1.0
122kB
Choonstertwo
07-24-13 12:30 AM


Post A Reply Comment Options
Unread 06-25-15, 12:17 PM  
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 82
Uploads: 32
Originally Posted by Banknorris
Since you initialized PVPStatus to falso, oldPVPStatus will NOT be different from PVPStatus when you log in a non-pvp zone and the CLEU will not be unregistered.
Thanks, I've fixed that. IsInPVPZone returning nil shouldn't be a problem, since I always use implicit boolean conditions (x or not x instead of x == true or x == false) nil will simply be treated as false-equivalent.

I'll release it as 1.15 now, let me know if you find anything else.
Last edited by Choonstertwo : 06-25-15 at 12:21 PM.
Choonstertwo is offline Report comment to moderator  
Reply With Quote
Unread 06-25-15, 09:37 AM  
Banknorris
A Warpwood Thunder Caller
 
Banknorris's Avatar
AddOn Author - Click to view AddOns

Forum posts: 98
File comments: 5
Uploads: 7
Since you initialized PVPStatus to false, oldPVPStatus will NOT be different from PVPStatus when you log in a non-pvp zone and the CLEU will not be unregistered. As a consequence, even in pvp only mode it will show all killing blows until you enter a pvp zone for the first time, when it will fix itself. In my suggestion post I let f.pvp (which is InPVP in your code) start as nil so didn't matter if I log in a non-pvp zone or in a pvp zone it will detect both changes nil->false or nil->true.

I changed line 175 from
Code:
local InPVP = false
to
Code:
local InPVP
The problem is that you have a function IsInPVPZone() which will make it return nil sometimes instead of only true or false. Apparently there is no big consequences since it is only used on line 285 and for that line it wouldn't matter. With that change things seems to be fine. I will let you know if I find another problem, but so far so good.
__________________
"In this world nothing can be said to be certain, except death and taxes." - Benjamin Franklin
Last edited by Banknorris : 06-25-15 at 12:35 PM.
Banknorris is offline Report comment to moderator  
Reply With Quote
Unread 06-24-15, 09:14 AM  
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 82
Uploads: 32
Originally Posted by Choonstertwo
Looks like I forgot to register/unregister the event when PVP_ONLY enabled in the new code (the current code doesn't use the setting at all). I'll fix it tomorrow.
I just pushed a new version that should fix this (when PVP_ONLY is enabled, CLEU is only registered when in PvP zones). Could you test it when you get a chance?
Choonstertwo is offline Report comment to moderator  
Reply With Quote
Unread 06-23-15, 01:58 PM  
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 82
Uploads: 32
Originally Posted by Banknorris
Hi I started tests with your last version. It worked fine in battlegrounds but then I went to Ulduar (to farm a transmog) and was getting the killing blow animations while killing trash.

I looked the code and thought that "COMBAT_LOG_EVENT_UNFILTERED" should only be registered when you call StartSession and unregister it when you call EndSession, but it is always registered and that event handler shows the image without checking the pvp status. Can you confirm this is intended or not?

I will continue with the tests latter.
Looks like I forgot to register/unregister the event when PVP_ONLY enabled in the new code (the current code doesn't use the setting at all). I'll fix it tomorrow.
Choonstertwo is offline Report comment to moderator  
Reply With Quote
Unread 06-23-15, 01:55 PM  
Banknorris
A Warpwood Thunder Caller
 
Banknorris's Avatar
AddOn Author - Click to view AddOns

Forum posts: 98
File comments: 5
Uploads: 7
Hi I started tests with your last version. It worked fine in battlegrounds but then I went to Ulduar (to farm a transmog) and was getting the killing blow animations while killing trash.

I looked the code and thought that "COMBAT_LOG_EVENT_UNFILTERED" should only be registered when you call StartSession and unregister it when you call EndSession, but it is always registered and that event handler shows the image without checking the pvp status. Can you confirm this is intended or not?
__________________
"In this world nothing can be said to be certain, except death and taxes." - Benjamin Franklin
Last edited by Banknorris : 06-25-15 at 09:38 AM.
Banknorris is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: