Teleportationstrank: yellow potions open the portal window
- Every yellow potion (potion kind 5, all stages) is a Teleportationstrank: drinking it posts the teleporter's event to the busy dialog with the hero's known portals; the potion is used up only when the hero teleports from that window (closing it keeps the potion) - Names replaced in every game text (ReplaceInTexts), so item names and the bottom bar's quick-select tooltip read Teleportationstrank; GameText reads the game's own text - HeroIndex / HeroInventory moved to skillslots for shared use - docs/teleport-potion.md; walking animation after loading noted in todo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6ca96d54b4
commit
46a08e97e9
13 files changed
+368
-22
No files matched your search
@@ -31,6 +31,7 @@
|
||||
// (0x5dc3f0; cell rects from CellRect 0x5dd530).
|
||||
|
||||
#include "mods/itemstack.h"
|
||||
#include "mods/teleportpotion.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
@@ -308,11 +309,16 @@ uint32_t __fastcall ObjMgr_DestroyObject(void* self, void* edx, uint32_t id, uin
|
||||
return ObjMgr_DestroyObject_original(self, edx, id, a, b, c);
|
||||
}
|
||||
|
||||
// cCreature::UseItem (0x54a8f0, ret 4): a new drink starts.
|
||||
|
||||
// cCreature::UseItem (0x54a8f0, ret 4): a new drink starts (a
|
||||
// Teleportationstrank opens the portal window instead, teleportpotion.cpp).
|
||||
char __fastcall Creature_UseItem(void* self, void* edx, uint32_t id);
|
||||
RE_HOOK(0x0054a8f0, Creature_UseItem);
|
||||
char __fastcall Creature_UseItem(void* self, void* edx, uint32_t id) {
|
||||
g_drunk = 0;
|
||||
if (mods::teleportpotion::UseItem(self, id)) {
|
||||
return 0;
|
||||
}
|
||||
return Creature_UseItem_original(self, edx, id);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user