WoWInterface SVN AKA

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 17 to Rev 16
    Reverse comparison

Rev 17 → Rev 16

trunk/localization.lua
1,4 → 1,4
AKA_TITLE="A.K.A. Version 2.9";
AKA_TITLE="A.K.A. Version 2.8";
 
 
AKA_TEXT = {};
9,7 → 9,7
AKA_TEXT["CHANNEL_BLOCK"]="Channel ";
AKA_TEXT["VERSION_UPDATE"]="A new version of AKA is available. http://www.wowinterface.com/downloads/info7813-AKA.html";
-- AKA_TEXT["VERSION_UPDATE"]="A new version of AKA is available. http://wowgnome.com/downloads/aka_2_8.zip";
AKA_TEXT["VERSION_NOTES"]="This is a recommended upgrade for WoW client 3.3.";
AKA_TEXT["VERSION_NOTES"]="This is a required upgrade for WoW client 3.2.";
 
AKA_ProfessionList={};
AKA_ProfessionList["1"]="Alchemy";
trunk/calendar.lua New file
0,0 → 1,248
-- AKA
-- Author: Lon Koenig
-- License: Creative Commons Attribution-Noncommercial 3.0 Unported License (see Readme.txt)
 
--[[
The code in this file mostly replicates functions from the Blizzard_Calendar addon.
In order to replicate the look of the default tooltip, it was neceassary to replicate a huge chunk of code and constants.
]]--
 
 
 
 
-- calendar constants:
-- -------------------------------
 
 
 
local CALENDAR_MAX_DAYS_PER_MONTH = 42; -- 6 weeks
local CALENDAR_MAX_DARKDAYS_PER_MONTH = 14; -- max days from the previous and next months when viewing the current month
 
-- Event Types
local CALENDAR_EVENTTYPE_RAID = 1;
local CALENDAR_EVENTTYPE_DUNGEON = 2;
local CALENDAR_EVENTTYPE_PVP = 3;
local CALENDAR_EVENTTYPE_MEETING = 4;
local CALENDAR_EVENTTYPE_OTHER = 5;
 
-- Invite Statuses
local CALENDAR_INVITESTATUS_INVITED = 1;
local CALENDAR_INVITESTATUS_ACCEPTED = 2;
local CALENDAR_INVITESTATUS_DECLINED = 3;
local CALENDAR_INVITESTATUS_CONFIRMED = 4;
local CALENDAR_INVITESTATUS_OUT = 5;
local CALENDAR_INVITESTATUS_STANDBY = 6;
 
 
 
local CALENDAR_MONTH_NAMES = {
MONTH_JANUARY,
MONTH_FEBRUARY,
MONTH_MARCH,
MONTH_APRIL,
MONTH_MAY,
MONTH_JUNE,
MONTH_JULY,
MONTH_AUGUST,
MONTH_SEPTEMBER,
MONTH_OCTOBER,
MONTH_NOVEMBER,
MONTH_DECEMBER,
};
 
-- month names show up differently for full date displays in some languages
local CALENDAR_FULLDATE_MONTH_NAMES = {
FULLDATE_MONTH_JANUARY,
FULLDATE_MONTH_FEBRUARY,
FULLDATE_MONTH_MARCH,
FULLDATE_MONTH_APRIL,
FULLDATE_MONTH_MAY,
FULLDATE_MONTH_JUNE,
FULLDATE_MONTH_JULY,
FULLDATE_MONTH_AUGUST,
FULLDATE_MONTH_SEPTEMBER,
FULLDATE_MONTH_OCTOBER,
FULLDATE_MONTH_NOVEMBER,
FULLDATE_MONTH_DECEMBER,
};
 
local CALENDAR_WEEKDAY_NAMES = {
WEEKDAY_SUNDAY,
WEEKDAY_MONDAY,
WEEKDAY_TUESDAY,
WEEKDAY_WEDNESDAY,
WEEKDAY_THURSDAY,
WEEKDAY_FRIDAY,
WEEKDAY_SATURDAY,
};
 
local CALENDAR_EVENTCOLOR_MODERATOR = {r=0.54, g=0.75, b=1.0};
 
local CALENDAR_CALENDARTYPE_COLORS = {
-- ["PLAYER"] = ,
-- ["GUILD"] = ,
["SYSTEM"] = {r=1.0, g=1.0, b=0.6},
["HOLIDAY"] = HIGHLIGHT_FONT_COLOR,
["RAID_LOCKOUT"] = NORMAL_FONT_COLOR,
["RAID_RESET"] = HIGHLIGHT_FONT_COLOR,
-- ["ARENA"] = "",
};
 
 
local CALENDAR_INVITESTATUS_NAMES = {
[CALENDAR_INVITESTATUS_CONFIRMED] = CALENDAR_STATUS_CONFIRMED,
[CALENDAR_INVITESTATUS_ACCEPTED] = CALENDAR_STATUS_ACCEPTED,
[CALENDAR_INVITESTATUS_DECLINED] = CALENDAR_STATUS_DECLINED,
[CALENDAR_INVITESTATUS_OUT] = CALENDAR_STATUS_OUT,
[CALENDAR_INVITESTATUS_STANDBY] = CALENDAR_STATUS_STANDBY,
[CALENDAR_INVITESTATUS_INVITED] = CALENDAR_STATUS_INVITED,
};
local CALENDAR_INVITESTATUS_COLORS = {
[CALENDAR_INVITESTATUS_CONFIRMED] = GREEN_FONT_COLOR,
[CALENDAR_INVITESTATUS_ACCEPTED] = GREEN_FONT_COLOR,
[CALENDAR_INVITESTATUS_DECLINED] = RED_FONT_COLOR,
[CALENDAR_INVITESTATUS_OUT] = RED_FONT_COLOR,
[CALENDAR_INVITESTATUS_STANDBY] = GREEN_FONT_COLOR,
[CALENDAR_INVITESTATUS_INVITED] = NORMAL_FONT_COLOR,
};
 
local CALENDAR_CALENDARTYPE_NAMEFORMAT = {
["PLAYER"] = {
[""] = "%s",
},
["GUILD"] = {
[""] = "%s",
},
["SYSTEM"] = {
[""] = "%s",
},
["HOLIDAY"] = {
["START"] = CALENDAR_EVENTNAME_FORMAT_START,
["END"] = CALENDAR_EVENTNAME_FORMAT_END,
[""] = "%s",
},
["RAID_LOCKOUT"] = {
[""] = CALENDAR_EVENTNAME_FORMAT_RAID_LOCKOUT,
},
["RAID_RESET"] = {
[""] = CALENDAR_EVENTNAME_FORMAT_RAID_RESET,
},
["ARENA"] = {
[""] = "%s",
},
};
-- My local functions:
-- ====================
 
 
 
 
-- ick - gotta dupe the whole pop-upn
local function _CalendarFrame_GetFullDateFromDay(dayButton)
-- hacked up version that rolls all the local calendar functions into one call
local weekday = mod((dayButton:GetID()) - 2 + CALENDAR_FIRST_WEEKDAY, 7) + 1;
local month, year = CalendarGetMonth(dayButton.monthOffset);
local day = dayButton.day;
local weekdayName = CALENDAR_WEEKDAY_NAMES[weekday];
local monthName = CALENDAR_FULLDATE_MONTH_NAMES[month];
return weekdayName, monthName, day, year, month;
 
end
 
 
local function _CalendarFrame_GetEventColor(calendarType, modStatus, inviteStatus)
-- unmodified version
if ( calendarType == "PLAYER" or calendarType == "GUILD" or calendarType == "ARENA" ) then
if ( modStatus == "MODERATOR" or modStatus == "CREATOR" ) then
return CALENDAR_EVENTCOLOR_MODERATOR;
elseif ( inviteStatus ) then
return CALENDAR_INVITESTATUS_COLORS[inviteStatus];
end
elseif ( CALENDAR_CALENDARTYPE_COLORS[calendarType] ) then
return CALENDAR_CALENDARTYPE_COLORS[calendarType];
end
-- default to normal color
return NORMAL_FONT_COLOR;
end
 
 
function AKA_CalendarDayButton_OnEnter(self)
if ( not self.day ) then
-- not yet updated
return;
end
 
local monthOffset = self.monthOffset;
local day = self.day;
local numEvents = CalendarGetNumDayEvents(monthOffset, day);
if ( numEvents <= 0 ) then
return;
end
 
-- add events
local title, hour, minute, calendarType, sequenceType, eventType, texture, modStatus, invitedBy, difficulty;
local eventTime, eventColor;
local numShownEvents = 0;
for i = 1, numEvents do
title, hour, minute, calendarType, sequenceType, eventType, texture,
modStatus, inviteStatus, invitedBy, difficulty = CalendarGetDayEvent(monthOffset, day, i);
if ( title and sequenceType ~= "ONGOING" ) then
if ( numShownEvents == 0 ) then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:ClearLines();
 
-- add date if we hit our first viewable event
local fullDate = format(FULLDATE, _CalendarFrame_GetFullDateFromDay(self));
GameTooltip:AddLine(fullDate, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine(" ");
else
GameTooltip:AddLine(" ");
end
 
eventTime = GameTime_GetFormattedTime(hour, minute, true);
eventColor = _CalendarFrame_GetEventColor(calendarType, modStatus, inviteStatus);
if ( calendarType == "RAID_RESET" or calendarType == "RAID_LOCKOUT" ) then
if ( difficulty > 1 ) then
title = format(DUNGEON_NAME_WITH_DIFFICULTY, title, _G["DUNGEON_DIFFICULTY"..difficulty]);
end
end
GameTooltip:AddDoubleLine(
format(CALENDAR_CALENDARTYPE_NAMEFORMAT[calendarType][sequenceType], title),
eventTime,
eventColor.r, eventColor.g, eventColor.b,
HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b,
1
);
if ( calendarType == "PLAYER" or calendarType == "GUILD" or calendarType == "ARENA" ) then
local isGuildWide = CalendarContextEventIsGuildWide(monthOffset, day, i);
if ( UnitIsUnit("player", invitedBy) ) then
if ( isGuildWide ) then
GameTooltip:AddLine(
CALENDAR_ANNOUNCEMENT_CREATEDBY_YOURSELF,
NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
else
GameTooltip:AddLine(
CALENDAR_INVITEDBY_YOURSELF,
NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
end
elseif ( invitedBy ~= "" ) then
if ( isGuildWide ) then
GameTooltip:AddLine(
format(CALENDAR_ANNOUNCEMENT_CREATEDBY_PLAYER, AKA_ExpandNickname(invitedBy)),
NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
else
GameTooltip:AddLine(
format(CALENDAR_INVITEDBY_PLAYER, AKA_ExpandNickname(invitedBy)),
NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
end
end
end
 
numShownEvents = numShownEvents + 1;
end
end
if ( numShownEvents > 0 ) then
GameTooltip:Show();
end
 
end
\ No newline at end of file Property changes : Added: svn:executable + *
trunk/Readme.txt
64,11 → 64,6
 
Version History
===============
Dec 8, 2009 (2.9)
* Updated TOC version for WoW client 3.2
* Removed in-game Calendar integration. This broke with the last version and needs a more maintainable approach.
* New (untested) code to identify player realms in cross-realm PUGs and BGs.
 
Aug 5, 2009 (2.8)
* Updated TOC version for WoW client 3.2
 
trunk/aka.lua
10,9 → 10,9
AKA_HighestSeenVersion=0;
AKA_FormatVersion=1.2;
AKA_variablesLoaded = false;
AKA_RaidInfoByName = {};
 
 
 
local VISIBLE_MAX=17; -- for scrolling menu
AKA_DEBUG=false;
AKA_ShowEvent=false;
417,12 → 417,8
AKA_ErrorMsg("ParseMessage("..msg..","..whoSent..", "..whichChannel..")");
local pString =msg; -- make a copy to take apart
-- pString="hoser`dude`hooman`flying monkeys`2`sproting`1`dancing`300`the coolist dud in the wowerzerverserse.";
local dashOffset=string.find(whoSent, "-");
local senderID=whoSent.."**"..myPlayerRealm;
if (dashOffset ~= nil) then
-- battlegroup format with dash:
senderID=string.gsub(whoSent,"\-","**");
end
local commaIndex;
local senderID=whoSent.."**"..myPlayerRealm
AKA_ParsedMsg={};
 
for count = 1, table.getn(messageFields) do
1287,7 → 1283,6
end
 
 
--[[
-- test to see if we have hooked the calendar yet.
 
 
1303,8 → 1298,8
end
 
end
]]--
 
 
-- check if we need to whisper anyone
-- AKA_SessionList[arg2]['status']='unknown';
local now = GetTime();
1430,10 → 1425,17
 
 
 
 
 
 
 
 
function AKA_RequestSync()
 
AKA_SendMsg(REQ_TOKEN);
-- DEFAULT_CHAT_FRAME:AddMessage("AKA-REQUESTING SYNC:", 0.5, 1.0, 0.5, 3);
 
-- DEFAULT_CHAT_FRAME:AddMessage("AKA-REQUESTING SYNC:", 0.5, 1.0, 0.5, 3);
 
needHello=false; -- we wil be responding to a sync request anyway
 
end
trunk/aka.toc
1,10 → 1,11
## Interface: 30300
## Interface: 30200
## Title: AKA
## Notes: Publishes player alts to guild members
## Version: 2.9
## Version: 2.8
## Author: Schnoggo
## OptionalDeps: CleanChat,Gatherer,GuildEventManager2
## SavedVariables: AKA_SavedVars, AKA_USERID, AKA_DEBUG, AKA_TRAFFICMONITOR
localization.lua
calendar.lua
AKA.lua
aka.xml
trunk/devnotes.txt
1,5 → 1,4
To Do:
Rework calendar integration
Test integration with WotLK versions of other addons
Show nicknames in Guild tab of Social panel
support guild info panels