Quantcast
WoWInterface - View Single Post - eCastingBar
Thread: eCastingBar
View Single Post
04-26-18, 02:15 AM   #3
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 180
Thanks for the help, d87!

The BfA Addon Changes page says:
Function changes:
  • UnitCastingInfo - dropped second parameter (nameSubtext).
  • UnitChannelInfo - dropped second parameter (nameSubtext).

Event changes:
  • UNIT_SPELLCAST_SUCCEEDED - no longer provide spell name and rank.
  • UNIT_SPELLCAST_FAILED_QUIET - no longer provide spell name and rank.
  • UNIT_SPELLCAST_INTERRUPTED - no longer provide spell name and rank.
  • UNIT_SPELLCAST_START - no longer provide spell name and rank.
  • UNIT_SPELLCAST_FAILED - no longer provide spell name and rank.
  • UNIT_SPELLCAST_STOP - no longer provide spell name and rank.
  • UNIT_SPELLCAST_DELAYED - no longer provide spell name and rank.
  • UNIT_SPELLCAST_CHANNEL_START - no longer provide spell name and rank.
  • UNIT_SPELLCAST_CHANNEL_UPDATE - no longer provide spell name and rank.
  • UNIT_SPELLCAST_CHANNEL_STOP - no longer provide spell name and rank.
I'm nowhere to understand .lua but I tried to remove spellName and spellRank from locals at every UNIT_SPELLCAST_* but that didn't work. Also curious what nameSubtext means? This refers to the (unit) parameter in this code? (for example) :

Code:
function eCastingBar_OnEvent(self, newevent, ...)
	local newarg1 = ...;

	local unit = self.unit;
	if newevent == "PLAYER_ENTERING_WORLD" then
		self:Hide();
		local nameChannel  = UnitChannelInfo(unit);
		local nameSpell  = UnitCastingInfo(unit);
		if ( nameChannel ) then
			newevent = "UNIT_SPELLCAST_CHANNEL_START";
			newarg1 = unit;
		elseif ( nameSpell ) then
			newevent = "UNIT_SPELLCAST_START";
			newarg1 = unit;
		end
	end
	if ( newarg1 ~= unit ) then
		return;
	end
  Reply With Quote