| 1923 | return std::min(s_max_tohit_chance,(std::max(s_min_tohit_chance, value))); |
| 1924 | } |
| 1925 | void 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 | |
| 1935 | void npcSendMessage(MapInstance &mi, QString& channel, int entityIdx, QString& message) |
| 1936 | { |
no test coverage detected