Core/Commands: Allow .mod drunk to modify the drunk state of the targeted player. Original idea on the forums, can't remember who exactly suggested this.

This commit is contained in:
Kapoeira
2011-12-10 14:39:52 -05:00
parent 8fb18de128
commit b0dfaa204d
+6 -1
View File
@@ -1129,7 +1129,12 @@ public:
uint16 drunkMod = drunklevel * 0xFFFF / 100;
handler->GetSession()->GetPlayer()->SetDrunkValue(drunkMod);
Player* target = handler->getSelectedPlayer();
if (!target)
target = handler->GetSession()->GetPlayer();
if (target)
target->SetDrunkValue(drunkMod);
return true;
}