Thread Tools Display Modes
10-13-10, 04:22 AM   #1
Elendhriel
A Deviate Faerie Dragon
Join Date: Jan 2010
Posts: 13
Fake Raid / Party

Hi, I am looking for a way to create a fake Raid or Party for design purposes. So that I am able to verify my lua changes without actually having to find a raid or a party. Is that somehow possible ? Thanks.
  Reply With Quote
10-13-10, 04:58 AM   #2
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
Going to Alterac gives you a chance to have a raid ;p
  Reply With Quote
10-13-10, 05:28 AM   #3
Broes
A Deviate Faerie Dragon
Join Date: Jul 2010
Posts: 11
Originally Posted by Elendhriel View Post
Hi, I am looking for a way to create a fake Raid or Party for design purposes. So that I am able to verify my lua changes without actually having to find a raid or a party. Is that somehow possible ? Thanks.
I always as a guildy for assistance, group up, make him leader, then log off/on to a bunch of alts (usually three), get them invited to the group, log back on main, thank guildy and happily test my settings with 3 other characters to play around with. If I need more chars, I repeat the process. Takes 2 minutes at max of your and a friends time.
  Reply With Quote
10-13-10, 05:48 AM   #4
Karudon
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 15
Code:
local RAIDMEMBER = 25;

local allClasses = { "WARRIOR", "ROGUE", "PRIEST", "SHAMAN", "DEATHKNIGHT", "HUNTER", "PALADIN", "MAGE", "WARLOCK", "DRUID" };
local simParty = {};
for i=1, 4, 1 do
	simParty[i] = {};
	simParty[i].class = allClasses[math.floor(math.random()*10)+1]
	simParty[i].name = "Party #"..i;
	simParty["party"..i] = simParty[i];
end
for i=1, (RAIDMEMBER-1), 1 do
	simParty[i] = {};
	simParty[i].class = allClasses[math.floor(math.random()*10)+1];
	simParty[i].name = "Raid #"..i;
	simParty[i].subGroup = math.floor((i-1)/5)+1;
	simParty["raid"..i] = simParty[i];
end

local OriginalUnitClass = UnitClass
function UnitClass(unit)
	if ( unit == "raid"..RAIDMEMBER ) then
		return OriginalUnitClass("player");
	elseif ( simParty[unit] ) then
		return simParty[unit].class, simParty[unit].class;
	end
	return OriginalUnitClass(unit);
end

local OriginalUnitName = UnitName
function UnitName(unit)
	if ( unit == "raid"..RAIDMEMBER ) then
		return OriginalUnitName("player");
	elseif ( simParty[unit] ) then
		return simParty[unit].name;
	end
	return OriginalUnitName(unit);
end

local OriginalUnitIsUnit = UnitIsUnit
function UnitIsUnit(u1,u2)
	if ( ( u1 == "raid"..RAIDMEMBER and u2 == "player" ) or ( u1 == "player" and u2 == "raid"..RAIDMEMBER ) ) then
		return true;
	end
	return OriginalUnitIsUnit(u1, u2);
end

local OriginalUnitHealth = UnitHealth
function UnitHealth(unit)
	if ( unit == "raid"..RAIDMEMBER ) then
		return OriginalUnitHealth("player");
	elseif ( simParty[unit] ) then
		return simParty[unit].health;
	end
	return OriginalUnitHealth(unit);
end

local OriginalUnitHealthMax = UnitHealthMax
function UnitHealthMax(unit)
	if ( unit == "raid"..RAIDMEMBER ) then
		return OriginalUnitHealthMax("player");
	elseif ( simParty[unit] ) then
		return simParty[unit].maxhealth;
	end
	return OriginalUnitHealthMax(unit);
end

local OriginalUnitPower = UnitPower
function UnitPower(unit, type)
	if ( unit == "raid"..RAIDMEMBER ) then
		return OriginalUnitPower("player", type);
	elseif ( simParty[unit] ) then
		return simParty[unit].power, 0;
	end
	return OriginalUnitPower(unit, type);
end

local OriginalUnitPowerMax = UnitPowerMax
function UnitPowerMax(unit, type)
	if ( unit == "raid"..RAIDMEMBER ) then
		return OriginalUnitPowerMax("player", type);
	elseif ( simParty[unit] ) then
		return simParty[unit].maxpower, 0;
	end
	return OriginalUnitPowerMax(unit, type);
end
UnitMana = UnitPower;
UnitManaMax = UnitPowerMax;

function GetNumRaidMembers()
	return RAIDMEMBER;
end

function IsRaidLeader()
	return true;
end

function GetRaidRosterInfo(unit)
	if ( unit == RAIDMEMBER ) then
		local _,cls=UnitClass("player")
		return UnitName("player"), 2, (math.floor((RAIDMEMBER-1)/5)+1), 80, cls, cls, "", true, false, nil, nil;
	elseif ( simParty[unit] ) then
		return simParty[unit].name, 0, simParty[unit].subGroup, 80, simParty[unit].class, simParty[unit].class, "", true, false, nil, nil;
	end
	return nil;
end
  Reply With Quote
10-14-10, 03:14 PM   #5
Elendhriel
A Deviate Faerie Dragon
Join Date: Jan 2010
Posts: 13
Thanks, I tried what you posted Karudon but getting errors with it
  Reply With Quote
10-14-10, 03:38 PM   #6
Karudon
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 15
Originally Posted by Elendhriel View Post
Thanks, I tried what you posted Karudon but getting errors with it
you have to edit it, it works, but with errors (false health update and co)
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Fake Raid / Party


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off