Files
AzerothCore-RealmMaster/scripts/hooks/mod-ale-patches
uprightbass360 64d0478320 feat: refactor post-install hooks to manifest-driven system
- Replace hardcoded hooks with external scripts in scripts/hooks/
- Add 4 generic hook scripts (copy-standard-lua, copy-aio-lua, mod-ale-patches, black-market-setup)
- Update all 28 module hook definitions in config/modules.json
- Remove legacy hook functions from manage-modules.sh
- Add 26 new Eluna Lua modules to .env.template (disabled by default)
- Add 3 new AIO modules to .env.template (disabled by default)
- Implement proper environment variable interface for hooks
- Add comprehensive documentation and refactoring summary

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-11-01 18:53:34 -04:00

52 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Module-specific hook for mod-ale compatibility patches
set -e
# Hook environment
MODULE_KEY="${MODULE_KEY:-}"
MODULE_DIR="${MODULE_DIR:-}"
MODULE_NAME="${MODULE_NAME:-}"
if [ -z "$MODULE_DIR" ] || [ ! -d "$MODULE_DIR" ]; then
echo "❌ mod-ale-patches: Invalid module directory: $MODULE_DIR"
exit 2
fi
echo "🔧 mod-ale-patches: Applying compatibility fixes to $MODULE_NAME"
# Apply MovePath compatibility patch
apply_movepath_patch() {
local target_file="$MODULE_DIR/src/LuaEngine/methods/CreatureMethods.h"
if [ ! -f "$target_file" ]; then
echo " ⚠️ MovePath patch target file missing: $target_file"
return 1
fi
if grep -q 'MoveWaypoint(creature->GetWaypointPath(), true);' "$target_file"; then
if sed -i 's/MoveWaypoint(creature->GetWaypointPath(), true);/MovePath(creature->GetWaypointPath(), FORCED_MOVEMENT_RUN);/' "$target_file"; then
echo " ✅ Applied MovePath compatibility fix"
return 0
else
echo " ❌ Failed to apply MovePath compatibility fix"
return 2
fi
else
echo " ✅ MovePath compatibility fix already present"
return 0
fi
}
# Apply all patches
patch_count=0
if apply_movepath_patch; then
patch_count=$((patch_count + 1))
fi
if [ $patch_count -eq 0 ]; then
echo " No patches needed or applied"
exit 0
fi
echo " ✅ Applied $patch_count compatibility patch(es)"
exit 0