Mercurial > wow > emfor1
comparison CensusPlus.lua @ 13:77d2c7423ed5
libs in .pkgmeta , whitespaces unified and guild changeable with
/script CensusPlus_MYGUILD="Any Guild";
| author | EmFor |
|---|---|
| date | Sun, 14 Aug 2011 15:45:33 +0200 |
| parents | 663f782bd903 |
| children |
comparison
equal
deleted
inserted
replaced
| 12:9ca9973996c8 | 13:77d2c7423ed5 |
|---|---|
| 39 local g_LocaleSet = false; | 39 local g_LocaleSet = false; |
| 40 local g_TZWarningSent = false; | 40 local g_TZWarningSent = false; |
| 41 | 41 |
| 42 | 42 |
| 43 ---------------------------------------------------------------------------------- | 43 ---------------------------------------------------------------------------------- |
| 44 --rm | |
| 45 -- guild to search (Extra button 'Take guild') | |
| 46 --local CensusPlus_MYGUILD = "The Last Journey"; | |
| 47 --local CensusPlus_MYGUILD = "Worgengrauen"; | |
| 48 CensusPlus_MYGUILD = "Flieht Ihr Narren"; | |
| 49 --------------------------------------------------------------------------------- | |
| 44 -- | 50 -- |
| 45 -- Constants | 51 -- Constants |
| 46 --rm | 52 local CensusPlus_VERSION = "5.0.2"; -- version |
| 47 -- Special guild to search | |
| 48 --local CensusPlus_MYGUILD = "The Last Journey"; | |
| 49 local CensusPlus_MYGUILD = "Worgengrauen"; | |
| 50 --------------------------------------------------------------------------------- | |
| 51 local CensusPlus_VERSION = "5.0.2"; -- version | |
| 52 local CensusPlus_MAXBARHEIGHT = 128; -- Length of blue bars | 53 local CensusPlus_MAXBARHEIGHT = 128; -- Length of blue bars |
| 53 local CensusPlus_NUMGUILDBUTTONS = 10; -- How many guild buttons are on the UI? | 54 local CensusPlus_NUMGUILDBUTTONS = 10; -- How many guild buttons are on the UI? |
| 54 local MAX_CHARACTER_LEVEL = 85; -- Maximum level a PC can attain | 55 local MAX_CHARACTER_LEVEL = 85; -- Maximum level a PC can attain |
| 55 --rm | 56 --rm |
| 56 local MAX_LEVEL_DISPLAY = 255; -- Maximum level a PC can attain | 57 local MAX_LEVEL_DISPLAY = 255; -- Maximum level a PC can attain |
| 57 local MAX_WHO_RESULTS = 49; -- Maximum number of who results the server will return | 58 local MAX_WHO_RESULTS = 49; -- Maximum number of who results the server will return |
| 58 CensusPlus_GUILDBUTTONSIZEY = 16; | 59 CensusPlus_GUILDBUTTONSIZEY = 16; |
| 59 local CensusPlus_UPDATEDELAY = 5; -- Delay time between /who messages | 60 local CensusPlus_UPDATEDELAY = 5; -- Delay time between /who messages |
| 60 local CP_MAX_TIMES = 50; | 61 local CP_MAX_TIMES = 50; |
| 61 | 62 |
| 62 local g_ServerPrefix = ""; -- US VERSION!! | 63 local g_ServerPrefix = ""; -- formerly only US VERSION |
| 63 --local g_ServerPrefix = "EU-"; -- EU VERSION!! | 64 --local g_ServerPrefix = "EU-"; -- EU VERSION automatically |
| 64 | 65 |
| 65 local wholib | 66 local wholib |
| 66 ---------------------------------------------------------------------------------- | 67 ---------------------------------------------------------------------------------- |
| 67 -- | 68 -- |
| 68 -- Print a string to the chat frame | 69 -- Print a string to the chat frame |
| 203 g_RaceClassList[CENSUSPlus_TAUREN] = 25; | 204 g_RaceClassList[CENSUSPlus_TAUREN] = 25; |
| 204 g_RaceClassList[CENSUSPlus_TROLL] = 26; | 205 g_RaceClassList[CENSUSPlus_TROLL] = 26; |
| 205 g_RaceClassList[CENSUSPlus_UNDEAD] = 27; | 206 g_RaceClassList[CENSUSPlus_UNDEAD] = 27; |
| 206 g_RaceClassList[CENSUSPlus_DRAENEI] = 28; | 207 g_RaceClassList[CENSUSPlus_DRAENEI] = 28; |
| 207 g_RaceClassList[CENSUSPlus_BLOODELF] = 29; | 208 g_RaceClassList[CENSUSPlus_BLOODELF] = 29; |
| 208 g_RaceClassList[CENSUSPlus_WORGEN] = 32; | 209 g_RaceClassList[CENSUSPlus_WORGEN] = 32; |
| 209 g_RaceClassList[CENSUSPlus_GOBLIN] = 31; | 210 g_RaceClassList[CENSUSPlus_GOBLIN] = 31; |
| 210 | 211 |
| 211 | 212 |
| 212 g_TimeDatabase[CENSUSPlus_DRUID] = 0; | 213 g_TimeDatabase[CENSUSPlus_DRUID] = 0; |
| 213 g_TimeDatabase[CENSUSPlus_HUNTER] = 0; | 214 g_TimeDatabase[CENSUSPlus_HUNTER] = 0; |
| 214 g_TimeDatabase[CENSUSPlus_MAGE] = 0; | 215 g_TimeDatabase[CENSUSPlus_MAGE] = 0; |
| 455 -- | 456 -- |
| 456 ----------------------------------------------------------------------------------- | 457 ----------------------------------------------------------------------------------- |
| 457 local function GetRaceClasses(race) | 458 local function GetRaceClasses(race) |
| 458 local ret = {}; | 459 local ret = {}; |
| 459 if (race == CENSUSPlus_ORC) then | 460 if (race == CENSUSPlus_ORC) then |
| 460 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; | 461 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; |
| 461 elseif (race == CENSUSPlus_TAUREN) then | 462 elseif (race == CENSUSPlus_TAUREN) then |
| 462 ret = {CENSUSPlus_PALADIN, CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_SHAMAN, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; | 463 ret = {CENSUSPlus_PALADIN, CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_SHAMAN, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; |
| 463 elseif (race == CENSUSPlus_TROLL) then | 464 elseif (race == CENSUSPlus_TROLL) then |
| 464 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; | 465 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; |
| 465 elseif (race == CENSUSPlus_UNDEAD) then | 466 elseif (race == CENSUSPlus_UNDEAD) then |
| 466 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; | 467 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; |
| 467 elseif (race == CENSUSPlus_DWARF) then | 468 elseif (race == CENSUSPlus_DWARF) then |
| 468 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_DEATHKNIGHT}; | 469 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_DEATHKNIGHT}; |
| 469 elseif (race == CENSUSPlus_GNOME) then | 470 elseif (race == CENSUSPlus_GNOME) then |
| 470 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; | 471 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; |
| 471 elseif (race == CENSUSPlus_HUMAN) then | 472 elseif (race == CENSUSPlus_HUMAN) then |
| 472 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_PALADIN, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; | 473 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_PALADIN, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; |
| 473 elseif (race == CENSUSPlus_NIGHTELF) then | 474 elseif (race == CENSUSPlus_NIGHTELF) then |
| 474 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; | 475 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; |
| 475 elseif (race == CENSUSPlus_BLOODELF) then | 476 elseif (race == CENSUSPlus_BLOODELF) then |
| 476 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; | 477 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; |
| 477 elseif (race == CENSUSPlus_DRAENEI) then | 478 elseif (race == CENSUSPlus_DRAENEI) then |
| 478 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DEATHKNIGHT}; | 479 ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DEATHKNIGHT}; |
| 479 elseif (race == CENSUSPlus_WORGEN) then | 480 elseif (race == CENSUSPlus_WORGEN) then |
| 480 ret = {CENSUSPlus_DEATHKNIGHT, CENSUSPlus_DRUID, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR}; | 481 ret = {CENSUSPlus_DEATHKNIGHT, CENSUSPlus_DRUID, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR}; |
| 481 elseif (race == CENSUSPlus_GOBLIN) then | 482 elseif (race == CENSUSPlus_GOBLIN) then |
| 482 ret = {CENSUSPlus_DEATHKNIGHT, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR}; | 483 ret = {CENSUSPlus_DEATHKNIGHT, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR}; |
| 483 end | 484 end |
| 484 return ret; | 485 return ret; |
| 485 end | 486 end |
| 486 | 487 |
| 487 ----------------------------------------------------------------------------------- | 488 ----------------------------------------------------------------------------------- |
| 651 -- | 652 -- |
| 652 -- Set up an empty frame to do updates | 653 -- Set up an empty frame to do updates |
| 653 -- | 654 -- |
| 654 local updateFrame = CreateFrame("Frame"); | 655 local updateFrame = CreateFrame("Frame"); |
| 655 updateFrame:SetScript("OnUpdate", CensusPlus_OnUpdate); | 656 updateFrame:SetScript("OnUpdate", CensusPlus_OnUpdate); |
| 656 CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" ); | |
| 657 end | 657 end |
| 658 | 658 |
| 659 function CensusPlus_FriendsFrame_OnEvent(self, event, ...) | 659 function CensusPlus_FriendsFrame_OnEvent(self, event, ...) |
| 660 | 660 |
| 661 -- CensusPlus_Msg( "CP_FF_OE Message =>" .. event ); | 661 -- CensusPlus_Msg( "CP_FF_OE Message =>" .. event ); |
| 2832 local factionGroup = UnitFactionGroup("player"); | 2832 local factionGroup = UnitFactionGroup("player"); |
| 2833 if( factionGroup == nil ) then | 2833 if( factionGroup == nil ) then |
| 2834 return; | 2834 return; |
| 2835 end | 2835 end |
| 2836 | 2836 |
| 2837 --rm | |
| 2838 CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" ); | |
| 2839 | |
| 2837 CensusPlusFactionName:SetText(format(CENSUSPlus_FACTION, factionGroup)); | 2840 CensusPlusFactionName:SetText(format(CENSUSPlus_FACTION, factionGroup)); |
| 2838 | 2841 |
| 2839 if( CensusPlus_Database["Info"]["Locale"] ~= nil ) then | 2842 if( CensusPlus_Database["Info"]["Locale"] ~= nil ) then |
| 2840 CensusPlusLocaleName:SetText(format(CENSUSPlus_LOCALE, CensusPlus_Database["Info"]["Locale"])); | 2843 CensusPlusLocaleName:SetText(format(CENSUSPlus_LOCALE, CensusPlus_Database["Info"]["Locale"])); |
| 2841 end | 2844 end |
| 2955 -- Update race bars | 2958 -- Update race bars |
| 2956 -- | 2959 -- |
| 2957 for i = 1, numRaces, 1 do | 2960 for i = 1, numRaces, 1 do |
| 2958 local race = thisFactionRaces[i]; | 2961 local race = thisFactionRaces[i]; |
| 2959 local buttonName = "CensusPlusRaceBar"..i; | 2962 local buttonName = "CensusPlusRaceBar"..i; |
| 2960 | 2963 |
| 2961 local button = getglobal(buttonName); | 2964 local button = getglobal(buttonName); |
| 2962 local thisCount = g_RaceCount[i]; | 2965 local thisCount = g_RaceCount[i]; |
| 2963 if ((thisCount ~= nil) and (thisCount > 0) and (maxCount > 0)) then | 2966 if ((thisCount ~= nil) and (thisCount > 0) and (maxCount > 0)) then |
| 2964 local height = floor((thisCount * CensusPlus_MAXBARHEIGHT / maxCount) ); | 2967 local height = floor((thisCount * CensusPlus_MAXBARHEIGHT / maxCount) ); |
| 2965 if (height < 2 or height == nil ) then height = 2; end | 2968 if (height < 2 or height == nil ) then height = 2; end |
| 2967 button:Show(); | 2970 button:Show(); |
| 2968 else | 2971 else |
| 2969 button:Hide(); | 2972 button:Hide(); |
| 2970 end | 2973 end |
| 2971 local normalTextureName="Interface\\AddOns\\CensusPlus\\Skin\\CensusPlus_"..g_RaceClassList[race]; | 2974 local normalTextureName="Interface\\AddOns\\CensusPlus\\Skin\\CensusPlus_"..g_RaceClassList[race]; |
| 2972 | 2975 |
| 2973 | 2976 |
| 2974 local legendName = "CensusPlusRaceLegend"..i; | 2977 local legendName = "CensusPlusRaceLegend"..i; |
| 2975 local legend = getglobal(legendName); | 2978 local legend = getglobal(legendName); |
| 2976 legend:SetNormalTexture(normalTextureName); | 2979 legend:SetNormalTexture(normalTextureName); |
| 2977 if (g_RaceSelected == i) then | 2980 if (g_RaceSelected == i) then |
| 2978 legend:LockHighlight(); | 2981 legend:LockHighlight(); |
| 3097 end | 3100 end |
| 3098 | 3101 |
| 3099 if( CP_PlayerListWindow:IsVisible() ) then | 3102 if( CP_PlayerListWindow:IsVisible() ) then |
| 3100 CensusPlus_PlayerListOnShow(); | 3103 CensusPlus_PlayerListOnShow(); |
| 3101 end | 3104 end |
| 3102 | |
| 3103 | 3105 |
| 3104 debugprofilestop(); | 3106 debugprofilestop(); |
| 3105 | 3107 |
| 3106 end | 3108 end |
| 3107 | 3109 |
| 3176 -- | 3178 -- |
| 3177 -- Level bar loaded | 3179 -- Level bar loaded |
| 3178 -- | 3180 -- |
| 3179 --------------------------------------------------------------------------------- | 3181 --------------------------------------------------------------------------------- |
| 3180 function CensusPlus_OnLoadLevel( self ) | 3182 function CensusPlus_OnLoadLevel( self ) |
| 3181 self:RegisterForClicks("LeftButtonUp","RightButtonUp"); | 3183 self:RegisterForClicks("LeftButtonUp","RightButtonUp"); |
| 3182 end | 3184 end |
| 3183 | 3185 |
| 3184 ---------------------------------------------------------------------------------- | 3186 ---------------------------------------------------------------------------------- |
| 3185 -- | 3187 -- |
| 3186 -- Level bar clicked | 3188 -- Level bar clicked |
| 3223 -- | 3225 -- |
| 3224 --------------------------------------------------------------------------------- | 3226 --------------------------------------------------------------------------------- |
| 3225 function CensusPlus_OnEnterClass( self ) | 3227 function CensusPlus_OnEnterClass( self ) |
| 3226 local factionGroup = UnitFactionGroup("player"); | 3228 local factionGroup = UnitFactionGroup("player"); |
| 3227 local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup); | 3229 local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup); |
| 3228 local id = self:GetID(); | 3230 local id = self:GetID(); |
| 3229 local className = thisFactionClasses[id]; | 3231 local className = thisFactionClasses[id]; |
| 3230 local count = g_ClassCount[id]; | 3232 local count = g_ClassCount[id]; |
| 3231 if (count ~= nil) then | 3233 if (count ~= nil) then |
| 3232 local percent = floor((count / g_TotalCount) * 100); | 3234 local percent = floor((count / g_TotalCount) * 100); |
| 3233 GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); | 3235 GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); |
| 3234 GameTooltip:SetText(className.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0); | 3236 GameTooltip:SetText(className.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0); |
| 3235 GameTooltip:Show(); | 3237 GameTooltip:Show(); |
| 3236 end | 3238 end |
| 3237 end | 3239 end |
| 3238 | 3240 |
| 3243 --------------------------------------------------------------------------------- | 3245 --------------------------------------------------------------------------------- |
| 3244 function CensusPlus_OnEnterLevel( this ) | 3246 function CensusPlus_OnEnterLevel( this ) |
| 3245 local id = this:GetID(); | 3247 local id = this:GetID(); |
| 3246 local count = g_LevelCount[id]; | 3248 local count = g_LevelCount[id]; |
| 3247 if (count ~= nil) then | 3249 if (count ~= nil) then |
| 3248 local percent = floor((count / g_TotalCount) * 100); | 3250 local percent = floor((count / g_TotalCount) * 100); |
| 3249 GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); | 3251 GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); |
| 3250 GameTooltip:SetText("Level "..id.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0); | 3252 GameTooltip:SetText("Level "..id.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0); |
| 3251 GameTooltip:Show(); | 3253 GameTooltip:Show(); |
| 3252 end | 3254 end |
| 3253 end | 3255 end |
| 4023 else | 4025 else |
| 4024 SendWho( msg ); | 4026 SendWho( msg ); |
| 4025 end | 4027 end |
| 4026 end | 4028 end |
| 4027 function CensusPlus_Options_OnMouseUp(self,...) | 4029 function CensusPlus_Options_OnMouseUp(self,...) |
| 4028 CensusPlus_Msg('Mouse up'); | 4030 CensusPlus_Msg('Mouse up'); |
| 4029 if ( self.isMoving ) then | 4031 if ( self.isMoving ) then |
| 4030 self:StopMovingOrSizing(); | 4032 self:StopMovingOrSizing(); |
| 4031 self.isMoving = false; | 4033 self.isMoving = false; |
| 4032 end | 4034 end |
| 4033 end | 4035 end |
| 4034 function CensusPlus_Options_OnMouseDown(self,arg1,arg2,arg3,...) | 4036 function CensusPlus_Options_OnMouseDown(self,arg1,arg2,arg3,...) |
| 4035 if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then | 4037 if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then |
| 4036 self:StartMoving(); | 4038 self:StartMoving(); |
| 4037 self.isMoving = true; | 4039 self.isMoving = true; |
| 4038 end | 4040 end |
| 4039 end | 4041 end |
| 4040 function CensusPlus_Mini_OnMouseDown( self, arg1 ) | 4042 function CensusPlus_Mini_OnMouseDown( self, arg1 ) |
| 4041 if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then | 4043 if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then |
| 4042 self:StartMoving(); | 4044 self:StartMoving(); |
| 4043 self.isMoving = true; | 4045 self.isMoving = true; |
| 4044 end | 4046 end |
| 4045 end | 4047 end |
| 4046 function CensusPlus_Census_OnMouseDown( self, arg1 ) | 4048 function CensusPlus_Census_OnMouseDown( self, arg1 ) |
| 4047 if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then | 4049 if ( ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then |
| 4048 self:StartMoving(); | 4050 self:StartMoving(); |
| 4049 self.isMoving = true; | 4051 self.isMoving = true; |
| 4050 end | 4052 end |
| 4051 end | 4053 end |
