[Patch] Amélioration commande .modify morph
Bonjour à tous,

Voici un patch empêchant l'utilisation de la commande .modify morph avec les display non existant.

[code=diff]diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index 0fbfab1..a6bfaef 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -2453,6 +2453,14 @@ bool ChatHandler::HandleModifyMorphCommand(char* args)

uint16 display_id = (uint16)atoi(args);

+ CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(display_id);
+ if(!displayEntry)
+ {
+ SendSysMessage(LANG_BAD_VALUE);
+ SetSentErrorMessage(true);
+ return false;
+ }
+
Unit *target = getSelectedUnit();
if (!target)
target = m_session->GetPlayer();[/code]

Have Fun !
Cordialement,
MacWarrior.

Retourner en haut Accueil