DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnRPC()

void WrittenNoteData::OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
inlineprotected

См. определение в файле WrittenNoteData.c строка 13

14 {
15 Param1<string> param = new Param1<string>("");
16
17 //sent from server, executed on client
18 if (rpc_type == ERPCs.RPC_WRITE_NOTE)
19 {
20 if (ctx.Read(param))
21 {
22 SetNoteText(param.param1);
23 }
24
25 g_Game.GetMission().SetNoteMenu(g_Game.GetUIManager().EnterScriptedMenu(MENU_NOTE, GetGame().GetUIManager().GetMenu())); //NULL means no parent
26
27 ItemBase pen;
28 ItemBase paper;
29 //int handwriting;
30
31 if (GetNoteInfo(pen,paper))
32 {
33 g_Game.GetMission().GetNoteMenu().InitNoteWrite(paper,pen,m_SimpleText);
34 }
35 }
36 //sent from client (NoteMenu), executed on server
37 if (rpc_type == ERPCs.RPC_WRITE_NOTE_CLIENT)
38 {
39 if (ctx.Read(param))
40 {
41 string old_string = m_SimpleText;
42 SetNoteText(param.param1);
44 }
45 }
46 if (rpc_type == ERPCs.RPC_READ_NOTE)
47 {
48 if (ctx.Read(param))
49 {
50 SetNoteText(param.param1);
51 }
52
53 g_Game.GetMission().SetNoteMenu(g_Game.GetUIManager().EnterScriptedMenu(MENU_NOTE, GetGame().GetUIManager().GetMenu())); //NULL means no parent
54 g_Game.GetMission().GetNoteMenu().InitNoteRead(m_SimpleText);
55 }
56 }
DayZGame g_Game
Определения DayZGame.c:3868
ERPCs
Определения ERPCs.c:2
class GP5GasMask extends MaskBase ItemBase
proto bool Read(void value_in)
void DepleteWritingImplement(notnull ItemBase pen, string old_text, string new_text)
Определения WrittenNoteData.c:83
bool GetNoteInfo(out ItemBase pen, out ItemBase paper)
Определения WrittenNoteData.c:65
string m_SimpleText
Определения WrittenNoteData.c:6
void SetNoteText(string text)
Определения WrittenNoteData.c:78
ItemBase m_WritingImplement
Определения WrittenNoteData.c:3
proto native CGame GetGame()
const int MENU_NOTE
Определения constants.c:190

Перекрестные ссылки DepleteWritingImplement(), g_Game, GetGame(), GetNoteInfo(), m_SimpleText, m_WritingImplement, MENU_NOTE, Serializer::Read() и SetNoteText().

Используется в InventoryItem::OnRPC().