void OnDismount(Player* player, uint32 entry) { QueryResult result = WorldDatabase.PQuery("SELECT summon_entry FROM mount_template WHERE entry='%u'", entry); std::cout << "\n" << entry << "\n"; if(!result) return; Field* fields = result->Fetch(); TempSummon* mount = player->SummonCreature(fields[0].GetUInt32(), player->GetPositionX() + 5, player->GetPositionY() + 5, player->GetPositionZ()); player->setMountPlaced(mount); player->getMountPlaced()->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, mount->GetFollowAngle()); }