Core/Scripts: Implemented method for sending encounter boss frames from scripts
This commit is contained in:
1 parent
9dfa00bb60
commit
ac689f456d
4 files changed
+34
-2
No files matched your search
@@ -396,3 +396,33 @@ bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player con
|
||||
instance->GetId(),criteria_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
void InstanceScript::SendEncounterUnit(uint32 type, Unit* unit, uint8 param1 /*= 0*/, uint8 param2 /*= 0*/)
|
||||
{
|
||||
WorldPacket data(SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT, 1);
|
||||
data << uint32(type);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
data.append(unit->GetPackGUID());
|
||||
data << uint8(param1);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
case 6:
|
||||
data << uint8(param1);
|
||||
data << uint8(param2);
|
||||
break;
|
||||
case 5:
|
||||
data << uint8(param1);
|
||||
break;
|
||||
case 7:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
instance->SendToPlayers(&data);
|
||||
}
|
||||
Reference in new issue
Block a user