Fix static code analysis warnings

[src/MenuInventory.cpp:798]: (style) The scope of the variable 'bonus_counter' can be reduced.
[src/MenuInventory.cpp:800]: (style) The scope of the variable 'item_id' can be reduced.
[src/MenuInventory.cpp:868]: (style) The scope of the variable 'item_id' can be reduced.
[src/MenuNPCActions.cpp:47]: (performance) Variable 'id' is assigned in constructor body. Consider performing initialization in initialization list
Fix NPC map event

The npc map event should not interfere with the npcs itself. It should
only trigger the dialog with a certain npc.

This fixes a crash at the cavern.txt map at polymorphable at
a514306591951b70eec155938f1216a492145a29
which has this structure:

	[event]
	# Unblock passage
	type=run_once
	npc=gravestone

	[npc]
	type=gravestone

This lead to a crash as the event referencing the npc, was loaded prior to
any npc loaded.
Merge pull request #59 from clintbellanger/master

take latest changes from main project
unblock ally pos on player teleport
Merge pull request #596 from stefanbeller/master

Fix a few static code analysis warnings
Merge pull request #598 from stefanbeller/npc

Fix NPC map event
Merge pull request #601 from RyanDansie/bug_fixes

unblock ally pos on player teleport