17 override bool GetCallsignNames(out
string company, out
string platoon, out
string squad, out
string character, out
string format)
19 int companyCallsignIndex, platoonCallsignIndex, squadCallsignIndex, characterCallsignNumber, characterRoleCallsignIndex;
20 character =
string.Empty;
22 if (!
GetCallsignIndexes(companyCallsignIndex, platoonCallsignIndex, squadCallsignIndex, characterCallsignNumber, characterRoleCallsignIndex))
29 if (!SetCallsignInfo())
31 company = companyCallsignIndex.ToString();
32 platoon = platoonCallsignIndex.ToString();
33 squad = squadCallsignIndex.ToString();
34 character = characterCallsignNumber.ToString();
35 format =
"ERROR %1-%2-%3-%4";
40 company =
m_CallsignInfo.GetCompanyCallsignName(companyCallsignIndex);
41 platoon =
m_CallsignInfo.GetPlatoonCallsignName(platoonCallsignIndex);
45 if (showCharacterCallsign)
47 if (characterRoleCallsignIndex >= 0)
48 character =
m_CallsignInfo.GetCharacterRoleCallsignName(characterRoleCallsignIndex);
50 character = characterCallsignNumber.ToString();
53 format =
m_CallsignInfo.GetCallsignFormat(showCharacterCallsign, characterRoleCallsignIndex);
60 if (m_iCompanyCallsign < 0 || m_iPlatoonCallsign < 0 || m_iSquadCallsign < 0)
68 companyIndex = m_iCompanyCallsign;
69 platoonIndex = m_iPlatoonCallsign;
70 squadIndex = m_iSquadCallsign;
92 if (
m_Faction != faction && faction !=
null)
94 FactionManager factionManager =
GetGame().GetFactionManager();
97 int factionId = factionManager.GetFactionIndex(faction);
107 if (companyIndex == m_iCompanyCallsign && m_iPlatoonCallsign == platoonIndex && m_iSquadCallsign == squadIndex &&
m_bAloneInGroup == aloneInGroup)
173 super.ClearCallsigns();
189 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
192 m_iCompanyCallsign = company;
193 m_iPlatoonCallsign = platoon;
194 m_iSquadCallsign = squad;
203 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
206 m_iCompanyCallsign = company;
207 m_iPlatoonCallsign = platoon;
208 m_iSquadCallsign = squad;
216 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
226 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
235 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
244 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
251 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
256 FactionManager factionManager =
GetGame().GetFactionManager();
260 Faction faction = factionManager.GetFactionByIndex(factionID);
262 if (faction !=
m_Faction && faction !=
null)
338 SCR_AIGroup playerGroup = groupManager.GetPlayerGroup(playerId);
345 AssignCharacterCallsign(playerGroup.GetFaction(), companyIndex, platoonIndex, squadIndex, characterNumber, characterRole, playerGroup.GetPlayerAndAgentCount(
true) <= 1);
353 if (playerId <= 0 || m_iPlayerId > 0)
365 writer.WriteInt(m_iCompanyCallsign);
366 writer.WriteInt(m_iPlatoonCallsign);
367 writer.WriteInt(m_iSquadCallsign);
379 int company, platoon, squad, character, role, factionID;
382 reader.ReadInt(company);
383 reader.ReadInt(platoon);
384 reader.ReadInt(squad);
385 reader.ReadInt(character);
386 reader.ReadInt(role);
387 reader.ReadBool(aloneInGroup);
388 reader.ReadInt(factionID);
400 if (!m_bIsServer ||
m_iPlayerId <= 0 || !m_CallsignManager)