fix crash on doMonsterSay

This commit is contained in:
ErikasKontenis 2019-12-29 11:03:26 +02:00
parent cc98f76906
commit d9d6bc5819
3 changed files with 10 additions and 12 deletions

View File

@ -46,8 +46,6 @@ function onUse(player, item, fromPosition, target, toPosition)
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found " .. rewardName .. ".")
player:addItemEx(reward:clone(), true)
if not getPlayerFlagValue(player, PlayerFlag_HasInfiniteCapacity) then
player:setStorageValue(chestQuestNumber, 1)
end
return true
end

View File

@ -3739,7 +3739,7 @@ void Game::addMonsterSayText(const Position& pos, const std::string& text)
for (Creature* spectator : list) {
if (Player* tmpPlayer = spectator->getPlayer()) {
tmpPlayer->sendCreatureSay(nullptr, TALKTYPE_MONSTER_SAY, text, &pos);
tmpPlayer->sendCreatureSay(tmpPlayer, TALKTYPE_MONSTER_SAY, text, &pos);
}
}
}

View File

@ -92,7 +92,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>_CONSOLE;$(PREPROCESSOR_DEFS);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CONSOLE;__EXCEPTION_TRACER__;$(PREPROCESSOR_DEFS);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
@ -124,7 +124,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;$(PREPROCESSOR_DEFS);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;__EXCEPTION_TRACER__;$(PREPROCESSOR_DEFS);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<WarningLevel>Level4</WarningLevel>