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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user