Mercurial > wow > wowdb-profiler
comparison Main.lua @ 303:e54e370e3a01
Removed some unnecessary debug prints.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Mon, 08 Jul 2013 13:17:22 -0500 |
parents | ca7abdbda078 |
children | 1e55a8ebedbd |
comparison
equal
deleted
inserted
replaced
302:ca7abdbda078 | 303:e54e370e3a01 |
---|---|
1076 | 1076 |
1077 local function UpdateUnitPet(unit_guid, unit_id) | 1077 local function UpdateUnitPet(unit_guid, unit_id) |
1078 local current_pet_guid = group_owner_guids_to_pet_guids[unit_guid] | 1078 local current_pet_guid = group_owner_guids_to_pet_guids[unit_guid] |
1079 | 1079 |
1080 if current_pet_guid then | 1080 if current_pet_guid then |
1081 Debug("Removing existing pet GUID for %s", _G.UnitName(unit_id)) | |
1082 group_owner_guids_to_pet_guids[unit_guid] = nil | 1081 group_owner_guids_to_pet_guids[unit_guid] = nil |
1083 group_pet_guids[current_pet_guid] = nil | 1082 group_pet_guids[current_pet_guid] = nil |
1084 end | 1083 end |
1085 local pet_guid = _G.UnitGUID(unit_id .. "pet") | 1084 local pet_guid = _G.UnitGUID(unit_id .. "pet") |
1086 | 1085 |
1087 if pet_guid then | 1086 if pet_guid then |
1088 Debug("Adding new pet GUID for %s.", _G.UnitName(unit_id)) | |
1089 group_owner_guids_to_pet_guids[unit_guid] = pet_guid | 1087 group_owner_guids_to_pet_guids[unit_guid] = pet_guid |
1090 group_pet_guids[pet_guid] = true | 1088 group_pet_guids[pet_guid] = true |
1091 end | 1089 end |
1092 end | 1090 end |
1093 | 1091 |
1097 local unit_type = is_raid and "raid" or "party" | 1095 local unit_type = is_raid and "raid" or "party" |
1098 local group_size = is_raid and _G.GetNumGroupMembers() or _G.GetNumSubgroupMembers() | 1096 local group_size = is_raid and _G.GetNumGroupMembers() or _G.GetNumSubgroupMembers() |
1099 | 1097 |
1100 table.wipe(group_member_guids) | 1098 table.wipe(group_member_guids) |
1101 | 1099 |
1102 Debug("GROUP_ROSTER_UPDATE: %s group - %d members.", unit_type, group_size) | |
1103 | |
1104 for index = 1, group_size do | 1100 for index = 1, group_size do |
1105 local unit_id = unit_type .. index | 1101 local unit_id = unit_type .. index |
1106 local unit_guid = _G.UnitGUID(unit_id) | 1102 local unit_guid = _G.UnitGUID(unit_id) |
1107 | 1103 |
1108 group_member_guids[unit_guid] = true | 1104 group_member_guids[unit_guid] = true |
1109 Debug("%s (%s) added as GUID %s", unit_id, _G.UnitName(unit_id), unit_guid) | |
1110 UpdateUnitPet(unit_guid, unit_id) | 1105 UpdateUnitPet(unit_guid, unit_id) |
1111 end | 1106 end |
1112 group_member_guids[PLAYER_GUID] = true | 1107 group_member_guids[PLAYER_GUID] = true |
1113 end | 1108 end |
1114 | 1109 |