MCPcopy Create free account
hub / github.com/Segs/Segs / npcSendMessage

Function npcSendMessage

Projects/CoX/Servers/MapServer/DataHelpers.cpp:1925–1933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1923 return std::min(s_max_tohit_chance,(std::max(s_min_tohit_chance, value)));
1924}
1925void npcSendMessage(MapClientSession &cl, QString& channel, int entityIdx, QString& message)
1926{
1927 QStringRef ch(&channel,0,1); //Get first char of channel name. Channel will default to local if unknown
1928 QString formated = ch + ' '+ message;
1929 Entity *e = getEntity(&cl, entityIdx);
1930
1931 if(e != nullptr)
1932 cl.m_current_map->add_chat_message(e, formated);
1933}
1934
1935void npcSendMessage(MapInstance &mi, QString& channel, int entityIdx, QString& message)
1936{

Callers 1

register_GenericTypesMethod · 0.85

Calls 2

getEntityFunction · 0.85
add_chat_messageMethod · 0.80

Tested by

no test coverage detected