You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!player->GetTransportInfo() || !player->GetTransportInfo()->IsOnVehicle() || !GetGOInfo()->IsUsableMounted())
1522
+
returnfalse;
1523
+
}
1524
+
1525
+
// We can't interact with anyone while being shapeshifted, unless form flags allow us to do so
1526
+
if (player->IsShapeShifted())
1527
+
{
1528
+
if (SpellShapeshiftFormEntry const* formEntry = sSpellShapeshiftFormStore.LookupEntry(player->GetShapeshiftForm()))
1529
+
{
1530
+
if (!(formEntry->flags1 & SHAPESHIFT_FLAG_CAN_NPC_INTERACT) && player->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_TAXI_FLIGHT)) // meant to have an can unshift check here
1531
+
returnfalse;
1532
+
}
1533
+
else
1534
+
returnfalse;
1535
+
}
1536
+
}
1537
+
1538
+
// client checks this but needs recheck
1539
+
if (GetGOInfo()->IsUsableInCombat() && player->IsInCombat())
1540
+
returnfalse;
1541
+
1542
+
// client checks this but needs recheck
1543
+
if (GetGOInfo()->CannotBeUsedUnderImmunity() && player->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE))
1544
+
returnfalse;
1545
+
1546
+
if (HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED) && !GetSpellForLock(player)) // we should not allow use of a locked GO
if (!_player->GetTransportInfo() || !_player->GetTransportInfo()->IsOnVehicle() || !obj->GetGOInfo()->IsUsableMounted())
329
-
return;
330
-
}
331
-
332
324
// Never expect this opcode for some type GO's
333
325
if (obj->GetGoType() == GAMEOBJECT_TYPE_GENERIC)
334
326
{
335
327
sLog.outError("HandleGameObjectUseOpcode: CMSG_GAMEOBJ_USE for not allowed GameObject type %u (Entry %u), didn't expect this to happen.", obj->GetGoType(), obj->GetEntry());
336
328
return;
337
329
}
338
330
339
-
if (obj->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED)) // we should not allow use of a locked GO
340
-
return;
341
-
342
331
if (obj->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE))
0 commit comments